Class: ActiveRecord::CompositeKey

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(association, key) ⇒ CompositeKey

Returns a new instance of CompositeKey.



6
7
8
9
# File 'lib/active_record/composite_key.rb', line 6

def initialize(association, key)
  @association = association
  @key = key
end

Instance Attribute Details

#associationObject (readonly)

Returns the value of attribute association.



4
5
6
# File 'lib/active_record/composite_key.rb', line 4

def association
  @association
end

#keyObject (readonly)

Returns the value of attribute key.



4
5
6
# File 'lib/active_record/composite_key.rb', line 4

def key
  @key
end