The comparison methods
Compare the object with other object for equivalency
@example
object == other # => true or false
@param [Object] other
the other object to compare with
@return [Boolean]
@api public
# File lib/equalizer.rb, line 112 def ==(other) other = coerce(other) if respond_to?(:coerce, true) other.kind_of?(self.class) && cmp?(__method__, other) end
Compare the object with other object for equality
@example
object.eql?(other) # => true or false
@param [Object] other
the other object to compare with
@return [Boolean]
@api public
# File lib/equalizer.rb, line 97 def eql?(other) instance_of?(other.class) && cmp?(__method__, other) end