Method: ActiveNode::Relationship#initialize
- Defined in:
- lib/active_node/relationship.rb
#initialize(other, props = {}) ⇒ Relationship
Returns a new instance of Relationship.
8 9 10 11 12 |
# File 'lib/active_node/relationship.rb', line 8 def initialize other, props={} self.other = other @hash = props.with_indifferent_access @id = @hash.delete(:id).try(&:to_i) end |