Class AutomateIt::TagManager::YAML
In: lib/automateit/tag_manager/yaml.rb
Parent: AutomateIt::TagManager::Struct

TagManager::YAML

A TagManager driver that reads tags from a YAML file.

Methods

setup  

Public Instance methods

Options:

  • :file — File to read tags from. The file is preprocessed with ERB and must produce YAML content.

[Source]

# File lib/automateit/tag_manager/yaml.rb, line 14
  def setup(opts={})
    if filename = opts.delete(:file)
      contents = _read(filename)
      output = HelpfulERB.new(contents, filename).result

      text = AutomateIt::TagManager::TagParser.normalize(output)
      opts[:struct] = ::YAML::load(text)
    end
    super(opts)
  end

[Validate]