Class: ActiveMocker::ModelSchema::Relationships
- Inherits:
-
Object
- Object
- ActiveMocker::ModelSchema::Relationships
- Defined in:
- lib/active_mocker/model_schema.rb
Instance Attribute Summary collapse
-
#class_name ⇒ Object
readonly
Returns the value of attribute class_name.
-
#foreign_key ⇒ Object
readonly
Returns the value of attribute foreign_key.
-
#join_table ⇒ Object
readonly
Returns the value of attribute join_table.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#through ⇒ Object
readonly
Returns the value of attribute through.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(name:, class_name:, type:, through:, foreign_key:, join_table:) ⇒ Relationships
constructor
A new instance of Relationships.
Constructor Details
#initialize(name:, class_name:, type:, through:, foreign_key:, join_table:) ⇒ Relationships
Returns a new instance of Relationships.
221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/active_mocker/model_schema.rb', line 221 def initialize(name:, class_name:, type:, through:, foreign_key:, join_table: ) @name = name @class_name = class_name @type = type @through = through unless through.nil? @foreign_key = foreign_key unless foreign_key.nil? @join_table = join_table unless join_table.nil? end |
Instance Attribute Details
#class_name ⇒ Object (readonly)
Returns the value of attribute class_name.
219 220 221 |
# File 'lib/active_mocker/model_schema.rb', line 219 def class_name @class_name end |
#foreign_key ⇒ Object (readonly)
Returns the value of attribute foreign_key.
219 220 221 |
# File 'lib/active_mocker/model_schema.rb', line 219 def foreign_key @foreign_key end |
#join_table ⇒ Object (readonly)
Returns the value of attribute join_table.
219 220 221 |
# File 'lib/active_mocker/model_schema.rb', line 219 def join_table @join_table end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
219 220 221 |
# File 'lib/active_mocker/model_schema.rb', line 219 def name @name end |
#through ⇒ Object (readonly)
Returns the value of attribute through.
219 220 221 |
# File 'lib/active_mocker/model_schema.rb', line 219 def through @through end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
219 220 221 |
# File 'lib/active_mocker/model_schema.rb', line 219 def type @type end |