Module: Flatter::Mapper::Mapping::ClassMethods
- Defined in:
- lib/flatter/mapper/mapping.rb
Instance Method Summary collapse
Instance Method Details
#map(*args, **opts) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/flatter/mapper/mapping.rb', line 6 def map(*args, **opts) mappings = opts.slice!(*) mappings_from_array = Hash[*args.zip(args).flatten] mappings.merge!(mappings_from_array) define_mappings(mappings, opts) end |
#mapping_options ⇒ Object
22 23 24 |
# File 'lib/flatter/mapper/mapping.rb', line 22 def @@mapping_options ||= [] end |
#mappings ⇒ Object
26 27 28 |
# File 'lib/flatter/mapper/mapping.rb', line 26 def mappings @mappings ||= {} end |
#mappings=(val) ⇒ Object
30 31 32 |
# File 'lib/flatter/mapper/mapping.rb', line 30 def mappings=(val) @mappings = val end |