Class: TwoWayMapper::Node::ActiveRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/two_way_mapper/node/active_record.rb

Constant Summary

Constants inherited from Base

Base::DIVIDER

Instance Attribute Summary

Attributes inherited from Base

#options, #selector

Instance Method Summary collapse

Methods inherited from Object

#write

Methods inherited from Base

#initialize, #keys, #read, #writable?, #write

Constructor Details

This class inherits a constructor from TwoWayMapper::Node::Base

Instance Method Details

#create_node(obj, key) ⇒ Object



10
11
12
# File 'lib/two_way_mapper/node/active_record.rb', line 10

def create_node(obj, key)
  obj.send("build_#{key}")
end

#rewind_to?(obj, key) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/two_way_mapper/node/active_record.rb', line 6

def rewind_to?(obj, key)
  super && obj.send(key)
end