Module: CompareHacks
Instance Method Summary collapse
- #!=(other) ⇒ Object
- #<(other) ⇒ Object
- #<=(other) ⇒ Object
- #==(other) ⇒ Object
- #>(other) ⇒ Object
- #>=(other) ⇒ Object
Instance Method Details
#!=(other) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/z3/hacks.rb', line 28 def !=(other) if other.is_a?(Z3::Expr) raise ArgumentError.new unless other.respond_to?(:coerce) a, b = other.coerce(self) return a != b end super end |
#<(other) ⇒ Object
64 65 66 67 68 69 70 71 |
# File 'lib/z3/hacks.rb', line 64 def <(other) if other.is_a?(Z3::Expr) raise ArgumentError.new unless other.respond_to?(:coerce) a, b = other.coerce(self) return a < b end super end |
#<=(other) ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/z3/hacks.rb', line 55 def <=(other) if other.is_a?(Z3::Expr) raise ArgumentError.new unless other.respond_to?(:coerce) a, b = other.coerce(self) return a <= b end super end |
#==(other) ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'lib/z3/hacks.rb', line 19 def ==(other) if other.is_a?(Z3::Expr) raise ArgumentError.new unless other.respond_to?(:coerce) a, b = other.coerce(self) return a == b end super end |