Module: AIXM::Concerns::HashEquality

Included in:
A, AIXM::Component, D, F, P, R, Schedule::Date, Schedule::Day, Schedule::Time, W, XY, Z
Defined in:
lib/aixm/concerns/hash_equality.rb

Overview

Implements Hash equality

Instance Method Summary collapse

Instance Method Details

#eql?(other) ⇒ Boolean

Returns:

  • (Boolean)

See Also:

  • Object#eql?


15
16
17
# File 'lib/aixm/concerns/hash_equality.rb', line 15

def eql?(other)
  hash == other.hash
end

#hashObject

See Also:

  • Object#hash


10
11
12
# File 'lib/aixm/concerns/hash_equality.rb', line 10

def hash
  [self.__class__, to_s].hash
end