Class: ActiveRecord::CompositeKey
- Inherits:
-
Object
- Object
- ActiveRecord::CompositeKey
- Defined in:
- lib/active_record/composite_key.rb
Instance Attribute Summary collapse
-
#association ⇒ Object
readonly
Returns the value of attribute association.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(association, key) ⇒ CompositeKey
constructor
A new instance of CompositeKey.
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
#association ⇒ Object (readonly)
Returns the value of attribute association.
4 5 6 |
# File 'lib/active_record/composite_key.rb', line 4 def association @association end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
4 5 6 |
# File 'lib/active_record/composite_key.rb', line 4 def key @key end |