Class: RareMap::Relation

Inherits:
Object
  • Object
show all
Defined in:
lib/rare_map/model_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_keyObject (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

#tableObject (readonly)

Returns the value of attribute table.



118
119
120
# File 'lib/rare_map/model_builder.rb', line 118

def table
  @table
end

#throughObject (readonly)

Returns the value of attribute through.



118
119
120
# File 'lib/rare_map/model_builder.rb', line 118

def through
  @through
end

#typeObject (readonly)

Returns the value of attribute type.



118
119
120
# File 'lib/rare_map/model_builder.rb', line 118

def type
  @type
end