Sha256: 2a1a0e0f0540272e68daf04803b37a8f1a2430beeea9734a067184870a293171
Contents?: true
Size: 723 Bytes
Versions: 31
Compression:
Stored size: 723 Bytes
Contents
# == TagManager::YAML # # A TagManager driver that reads tags from a YAML file. class AutomateIt::TagManager::YAML < AutomateIt::TagManager::Struct depends_on :nothing def suitability(method, *args) # :nodoc: return 5 end # Options: # * :file -- File to read tags from. The file is preprocessed with ERB and # must produce YAML content. 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 def _read(filename) return File.read(filename) end private :_read end
Version data entries
31 entries across 31 versions & 2 rubygems