Class: Spider::Model::Storage::Db::ForeignKeyConstraint
- Defined in:
- lib/spiderfw/model/storage/db/db_schema.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #eq?(other) ⇒ Boolean
-
#initialize(name, table, fields, options = {}) ⇒ ForeignKeyConstraint
constructor
A new instance of ForeignKeyConstraint.
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, ={}) @name = name.to_s @table = table @fields = fields @options = end |
Instance Attribute Details
#fields ⇒ Object (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 |
#name ⇒ Object (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 |
#options ⇒ Object (readonly)
Returns the value of attribute options.
323 324 325 |
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 323 def @options end |
#table ⇒ Object (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 end |
#eq?(other) ⇒ Boolean
336 337 338 |
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 336 def eq?(other) self == other end |