class DTK::DSL::FileGenerator::ContentInput::Hash
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
# File lib/dsl/file_generator/content_input/hash.rb, line 24 def initialize(*args) super initialize_tags_and_id_handle! end
Public Instance Methods
set(output_key, val, opts = {})
click to toggle source
opts can have keys
:tags :tag
Calls superclass method
# File lib/dsl/file_generator/content_input/hash.rb, line 32 def set(output_key, val, opts = {}) ret = super(output_key, val) tags = opts[:tag] || opts[:tags] add_tags_to_obj?(ret, tags) unless tags.nil? ret end
val(output_key, opts = {})
click to toggle source
opts can have keys
:tag - tag to filter on
Calls superclass method
# File lib/dsl/file_generator/content_input/hash.rb, line 41 def val(output_key, opts = {}) ret = super(output_key) if tag = opts[:tag] ret = nil unless obj_has_tag?(ret, tag) end ret end