Module: Unity::Comparison
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary
collapse
#dimension_int, #property, #property_name
Instance Method Details
#==(other) ⇒ Object
27
28
29
|
# File 'lib/unity/comparison.rb', line 27
def == other
self.compatible?(other) && self.convert_to(other).value == other.value
end
|
#compatible!(other) ⇒ Object
23
24
25
|
# File 'lib/unity/comparison.rb', line 23
def compatible! other
compatible?(other) ? true : raise(IncompatibleError)
end
|
#compatible?(other) ⇒ Boolean
19
20
21
|
# File 'lib/unity/comparison.rb', line 19
def compatible? other
self.dimension_int == other.dimension_int
end
|