Method: HashMap::DSL#to_child

Defined in:
lib/hash_map/dsl.rb

#to_child(key, opts = {}, &block) ⇒ Object



104
105
106
107
108
# File 'lib/hash_map/dsl.rb', line 104

def to_child(key, opts = {}, &block)
  flat = _nested(key, opts, &block)
  flat.each { |attr| attr[:key].unshift(key) }
  @attributes += flat
end