Class: Mv::Core::Constraint::Base
- Inherits:
-
Object
- Object
- Mv::Core::Constraint::Base
- Includes:
- Comparable
- Defined in:
- lib/mv/core/constraint/base.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#validations ⇒ Object
readonly
Returns the value of attribute validations.
Instance Method Summary collapse
- #<=>(other_constraint) ⇒ Object
- #create ⇒ Object
- #delete ⇒ Object
-
#initialize(description) ⇒ Base
constructor
A new instance of Base.
- #update(new_constraint) ⇒ Object
Constructor Details
#initialize(description) ⇒ Base
Returns a new instance of Base.
13 14 15 16 |
# File 'lib/mv/core/constraint/base.rb', line 13 def initialize description @description = description @validations = [] end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
9 10 11 |
# File 'lib/mv/core/constraint/base.rb', line 9 def description @description end |
#validations ⇒ Object (readonly)
Returns the value of attribute validations.
9 10 11 |
# File 'lib/mv/core/constraint/base.rb', line 9 def validations @validations end |
Instance Method Details
#<=>(other_constraint) ⇒ Object
18 19 20 |
# File 'lib/mv/core/constraint/base.rb', line 18 def <=> other_constraint [self.class.name, description, validations.sort] <=> [other_constraint.class.name, other_constraint.description, other_constraint.validations.sort] end |
#create ⇒ Object
22 23 |
# File 'lib/mv/core/constraint/base.rb', line 22 def create end |
#delete ⇒ Object
25 26 |
# File 'lib/mv/core/constraint/base.rb', line 25 def delete end |
#update(new_constraint) ⇒ Object
28 29 |
# File 'lib/mv/core/constraint/base.rb', line 28 def update new_constraint end |