Module: Her::Model::ORM::ComparisonMethods

Extended by:
ActiveSupport::Concern
Included in:
Her::Model::ORM
Defined in:
lib/her/model/orm/comparison_methods.rb

Instance Method Summary collapse

Instance Method Details

#==(other) ⇒ Object

Return ‘true` if the other object is also a Her::Model and has matching data



8
9
10
# File 'lib/her/model/orm/comparison_methods.rb', line 8

def ==(other)
  other.is_a?(Her::Model) && @data == other.data
end

#eql?(other) ⇒ Boolean

Delegate to the == method

Returns:

  • (Boolean)


13
14
15
# File 'lib/her/model/orm/comparison_methods.rb', line 13

def eql?(other)
  self == other
end