Module: LHS::Record::Mapping::ClassMethods

Defined in:
lib/lhs/concerns/record/mapping.rb

Instance Method Summary collapse

Instance Method Details

#map(name, block) ⇒ Object



20
21
22
# File 'lib/lhs/concerns/record/mapping.rb', line 20

def map(name, block)
  mapping[name] = block
end

#mappingObject



12
13
14
# File 'lib/lhs/concerns/record/mapping.rb', line 12

def mapping
  @mapping ||= {}
end

#mapping=(mapping) ⇒ Object



16
17
18
# File 'lib/lhs/concerns/record/mapping.rb', line 16

def mapping=(mapping)
  @mapping = mapping
end