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.
276 277 278 279 280 281 |
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 276 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.
274 275 276 |
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 274 def fields @fields end |
#name ⇒ Object (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 |
#options ⇒ Object (readonly)
Returns the value of attribute options.
274 275 276 |
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 274 def @options end |
#table ⇒ Object (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 end |
#eq?(other) ⇒ Boolean
287 288 289 |
# File 'lib/spiderfw/model/storage/db/db_schema.rb', line 287 def eq?(other) self == other end |