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.



325
326
327
328
329
330
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 325

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.



323
324
325
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 323

def fields
  @fields
end

#nameObject (readonly)

Returns the value of attribute name.



323
324
325
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 323

def name
  @name
end

#optionsObject (readonly)

Returns the value of attribute options.



323
324
325
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 323

def options
  @options
end

#tableObject (readonly)

Returns the value of attribute table.



323
324
325
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 323

def table
  @table
end

Instance Method Details

#==(other) ⇒ Object



332
333
334
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 332

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

#eq?(other) ⇒ Boolean

Returns:

  • (Boolean)


336
337
338
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 336

def eq?(other)
    self ==  other
end