Class: Nullalign::NonnullConstraint
- Inherits:
-
Object
- Object
- Nullalign::NonnullConstraint
- Defined in:
- lib/nullalign/nonnull_constraint.rb
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Returns the value of attribute column.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#table_name ⇒ Object
readonly
Returns the value of attribute table_name.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(model, table_name, column) ⇒ NonnullConstraint
constructor
A new instance of NonnullConstraint.
Constructor Details
#initialize(model, table_name, column) ⇒ NonnullConstraint
Returns a new instance of NonnullConstraint.
4 5 6 7 8 |
# File 'lib/nullalign/nonnull_constraint.rb', line 4 def initialize(model, table_name, column) @model = model @table_name = table_name @column = column.to_s end |
Instance Attribute Details
#column ⇒ Object (readonly)
Returns the value of attribute column.
3 4 5 |
# File 'lib/nullalign/nonnull_constraint.rb', line 3 def column @column end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
3 4 5 |
# File 'lib/nullalign/nonnull_constraint.rb', line 3 def model @model end |
#table_name ⇒ Object (readonly)
Returns the value of attribute table_name.
3 4 5 |
# File 'lib/nullalign/nonnull_constraint.rb', line 3 def table_name @table_name end |
Instance Method Details
#==(other) ⇒ Object
10 11 12 13 |
# File 'lib/nullalign/nonnull_constraint.rb', line 10 def ==(other) self.table_name == other.table_name && self.column == other.column end |