Class: TwoWayMapper::Node::Hash
- Defined in:
- lib/two_way_mapper/node/hash.rb
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/hash.rb', line 6 def write(source, value) rewinded = rewind_forward source, 1 return unless writable?(rewinded[keys.last], value) rewinded[keys.last] = value end |