Module: Garb::Attributes::ClassMethods

Defined in:
lib/garb/attributes.rb

Instance Method Summary collapse

Instance Method Details

#ga_attribute(*keys) ⇒ Object



8
9
10
11
12
# File 'lib/garb/attributes.rb', line 8

def ga_attribute(*keys)
  hashes, symbols = keys.partition { |k| k.is_a? Hash }
  symbols.each { |key| define_a_method_for key }
  hashes.each { |hash| map_values_for hash }
end