Class: Mv::Core::Constraint::Base

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/mv/core/constraint/base.rb

Direct Known Subclasses

Index, Trigger

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#descriptionObject (readonly)

Returns the value of attribute description.



9
10
11
# File 'lib/mv/core/constraint/base.rb', line 9

def description
  @description
end

#validationsObject (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

#createObject



22
23
# File 'lib/mv/core/constraint/base.rb', line 22

def create
end

#deleteObject



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