Module: Dozuki::Mapper::ClassMethods
- Defined in:
- lib/dozuki-mapper.rb
Instance Method Summary collapse
Instance Method Details
#from_node(node) ⇒ Object
15 16 17 18 19 |
# File 'lib/dozuki-mapper.rb', line 15 def from_node(node) new.tap do |instance| mapper.call Proxy.new(instance, node) end end |
#map_with(&blk) ⇒ Object
9 10 11 |
# File 'lib/dozuki-mapper.rb', line 9 def map_with(&blk) @mapper = blk end |
#mapper ⇒ Object
12 13 14 |
# File 'lib/dozuki-mapper.rb', line 12 def mapper @mapper end |