Class: TwoWayMapper::Node::Object
- Defined in:
- lib/two_way_mapper/node/object.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #keys, #read, #writable?
Constructor Details
This class inherits a constructor from TwoWayMapper::Node::Base
Instance Method Details
#write(source, value) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/two_way_mapper/node/object.rb', line 6 def write(source, value) rewinded = rewind_forward(source, 1) return unless writable?(rewinded.send(keys.last), value) rewinded.send("#{keys.last}=", value) end |