Class: RareMap::Relation
- Inherits:
-
Object
- Object
- RareMap::Relation
- Defined in:
- lib/rare_map/model_builder.rb
Instance Attribute Summary collapse
-
#foreign_key ⇒ Object
readonly
Returns the value of attribute foreign_key.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
-
#through ⇒ Object
readonly
Returns the value of attribute through.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, foreign_key, table, through = nil) ⇒ Relation
constructor
A new instance of Relation.
Constructor Details
#initialize(type, foreign_key, table, through = nil) ⇒ Relation
Returns a new instance of Relation.
120 121 122 |
# File 'lib/rare_map/model_builder.rb', line 120 def initialize(type, foreign_key, table, through = nil) @type, @foreign_key, @table, @through = type, foreign_key, table, through end |
Instance Attribute Details
#foreign_key ⇒ Object (readonly)
Returns the value of attribute foreign_key.
118 119 120 |
# File 'lib/rare_map/model_builder.rb', line 118 def foreign_key @foreign_key end |
#table ⇒ Object (readonly)
Returns the value of attribute table.
118 119 120 |
# File 'lib/rare_map/model_builder.rb', line 118 def table @table end |
#through ⇒ Object (readonly)
Returns the value of attribute through.
118 119 120 |
# File 'lib/rare_map/model_builder.rb', line 118 def through @through end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
118 119 120 |
# File 'lib/rare_map/model_builder.rb', line 118 def type @type end |