class Dbee::Model::Constraints::Base
Base
class for all constraints.
Attributes
name[R]
parent[R]
Public Class Methods
new(name: '', parent: '')
click to toggle source
# File lib/dbee/model/constraints/base.rb, line 19 def initialize(name: '', parent: '') @name = name.to_s @parent = parent.to_s end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/dbee/model/constraints/base.rb, line 24 def <=>(other) "#{self.class.name}#{name}#{parent}" <=> "#{other.class.name}#{other.name}#{other.parent}" end
==(other)
click to toggle source
# File lib/dbee/model/constraints/base.rb, line 32 def ==(other) other.instance_of?(self.class) && other.name == name && other.parent == parent end
Also aliased as: eql?
hash()
click to toggle source
# File lib/dbee/model/constraints/base.rb, line 28 def hash "#{self.class.name}#{name}#{parent}".hash end