Class: EasyMapper::Associations::BelongsTo
- Inherits:
-
Object
- Object
- EasyMapper::Associations::BelongsTo
- Defined in:
- lib/easy_mapper/associations/belongs_to.rb
Instance Attribute Summary collapse
-
#cls ⇒ Object
Returns the value of attribute cls.
-
#id_column ⇒ Object
Returns the value of attribute id_column.
Instance Method Summary collapse
-
#initialize(cls, attribute_name, id_column) ⇒ BelongsTo
constructor
A new instance of BelongsTo.
Constructor Details
#initialize(cls, attribute_name, id_column) ⇒ BelongsTo
Returns a new instance of BelongsTo.
6 7 8 9 10 |
# File 'lib/easy_mapper/associations/belongs_to.rb', line 6 def initialize(cls, attribute_name, id_column) @cls = cls @attribute_name = attribute_name @id_column = id_column end |
Instance Attribute Details
#cls ⇒ Object
Returns the value of attribute cls.
4 5 6 |
# File 'lib/easy_mapper/associations/belongs_to.rb', line 4 def cls @cls end |
#id_column ⇒ Object
Returns the value of attribute id_column.
4 5 6 |
# File 'lib/easy_mapper/associations/belongs_to.rb', line 4 def id_column @id_column end |