Sha256: 8fb39508a67d3821b2a95a2761561052e8cbdbdf6d3d708d11db0dec704c71de

Contents?: true

Size: 302 Bytes

Versions: 15

Compression:

Stored size: 302 Bytes

Contents

using AIXM::Refinements

module AIXM
  module Concerns

    # Implements Hash equality
    module HashEquality

      # @see Object#hash
      def hash
        [self.__class__, to_s].hash
      end

      # @see Object#eql?
      def eql?(other)
        hash == other.hash
      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
aixm-1.5.3 lib/aixm/concerns/hash_equality.rb
aixm-1.5.2 lib/aixm/concerns/hash_equality.rb
aixm-1.5.1 lib/aixm/concerns/hash_equality.rb
aixm-1.5.0 lib/aixm/concerns/hash_equality.rb
aixm-1.4.3 lib/aixm/concerns/hash_equality.rb
aixm-1.4.2 lib/aixm/concerns/hash_equality.rb
aixm-1.4.1 lib/aixm/concerns/hash_equality.rb
aixm-1.4.0 lib/aixm/concerns/hash_equality.rb
aixm-1.3.4 lib/aixm/concerns/hash_equality.rb
aixm-1.3.3 lib/aixm/concerns/hash_equality.rb
aixm-1.3.2 lib/aixm/concerns/hash_equality.rb
aixm-1.3.1 lib/aixm/concerns/hash_equality.rb
aixm-1.3.0 lib/aixm/concerns/hash_equality.rb
aixm-1.2.1 lib/aixm/concerns/hash_equality.rb
aixm-1.2.0 lib/aixm/concerns/hash_equality.rb