Class: Spider::Model::Storage::Db::ForeignKeyConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/spiderfw/model/storage/db/db_schema.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, table, fields, options = {}) ⇒ ForeignKeyConstraint

Returns a new instance of ForeignKeyConstraint.



276
277
278
279
280
281
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 276

def initialize(name, table, fields, options={})
    @name = name.to_s
    @table = table
    @fields = fields
    @options = options
end

Instance Attribute Details

#fieldsObject (readonly)

Returns the value of attribute fields.



274
275
276
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 274

def fields
  @fields
end

#nameObject (readonly)

Returns the value of attribute name.



274
275
276
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 274

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



274
275
276
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 274

def options
  @options
end

#tableObject (readonly)

Returns the value of attribute table.



274
275
276
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 274

def table
  @table
end

Instance Method Details

#==(other) ⇒ Object



283
284
285
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 283

def ==(other)
    other.table == @table && other.fields == @fields && other.options == @options
end

#eq?(other) ⇒ Boolean

Returns:

  • (Boolean)


287
288
289
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 287

def eq?(other)
    self ==  other
end