Module: Hoodie::Equalizer::Methods
- Defined in:
- lib/hoodie/utils/equalizer.rb
Overview
The comparison methods
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Compare the object with other object for equivalency.
-
#eql?(other) ⇒ Boolean
Compare the object with other object for equality.
Instance Method Details
#==(other) ⇒ Boolean
Compare the object with other object for equivalency.
141 142 143 |
# File 'lib/hoodie/utils/equalizer.rb', line 141 def ==(other) other.kind_of?(self.class) && cmp?(__method__, other) end |
#eql?(other) ⇒ Boolean
Compare the object with other object for equality.
126 127 128 |
# File 'lib/hoodie/utils/equalizer.rb', line 126 def eql?(other) instance_of?(other.class) && cmp?(__method__, other) end |