Class: EasyMapper::Associations::BelongsTo

Inherits:
Object
  • Object
show all
Defined in:
lib/easy_mapper/associations/belongs_to.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clsObject

Returns the value of attribute cls.



4
5
6
# File 'lib/easy_mapper/associations/belongs_to.rb', line 4

def cls
  @cls
end

#id_columnObject

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