Method: Equalizer::Methods#==

Defined in:
lib/equalizer.rb

#==(other) ⇒ Boolean

Compare the object with other object for equivalency

Examples:

object == other  # => true or false

Parameters:

  • other (Object)

    the other object to compare with

Returns:

  • (Boolean)


116
117
118
119
# File 'lib/equalizer.rb', line 116

def ==(other)
  other = coerce(other).first if respond_to?(:coerce, true)
  other.kind_of?(self.class) && cmp?(__method__, other)
end