Class: ActiveMocker::ModelSchema::Relationships

Inherits:
Object
  • Object
show all
Defined in:
lib/active_mocker/model_schema.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, class_name:, type:, through:, source:, foreign_key:, join_table:) ⇒ Relationships

Returns a new instance of Relationships.



228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/active_mocker/model_schema.rb', line 228

def initialize(name:,
    class_name:,
    type:,
    through:,
    source:,
    foreign_key:,
    join_table:
)
  @name        = name
  @class_name  = class_name
  @type        = type
  @through     = through
  @source      = source
  @foreign_key = foreign_key
  @join_table  = join_table
end

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name.



226
227
228
# File 'lib/active_mocker/model_schema.rb', line 226

def class_name
  @class_name
end

#foreign_keyObject (readonly)

Returns the value of attribute foreign_key.



226
227
228
# File 'lib/active_mocker/model_schema.rb', line 226

def foreign_key
  @foreign_key
end

#join_tableObject (readonly)

Returns the value of attribute join_table.



226
227
228
# File 'lib/active_mocker/model_schema.rb', line 226

def join_table
  @join_table
end

#nameObject (readonly)

Returns the value of attribute name.



226
227
228
# File 'lib/active_mocker/model_schema.rb', line 226

def name
  @name
end

#sourceObject (readonly)

Returns the value of attribute source.



226
227
228
# File 'lib/active_mocker/model_schema.rb', line 226

def source
  @source
end

#throughObject (readonly)

Returns the value of attribute through.



226
227
228
# File 'lib/active_mocker/model_schema.rb', line 226

def through
  @through
end

#typeObject (readonly)

Returns the value of attribute type.



226
227
228
# File 'lib/active_mocker/model_schema.rb', line 226

def type
  @type
end