Sha256: 591f1381ef659b178b4fcbdf959a174ac58ca3ee565f1551c53401e374327a69

Contents?: true

Size: 237 Bytes

Versions: 5

Compression:

Stored size: 237 Bytes

Contents

# frozen_string_literal: true

module Shivers
  module ValueEquality
    def ==(other)
      other.class == self.class && other.state == state
    end

    alias eql? ==

    def hash
      self.class.hash ^ state.hash
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
shivers-0.6.0.pre.7 lib/shivers/value_equality.rb
shivers-0.6.0.pre.6 lib/shivers/value_equality.rb
shivers-0.6.0.pre.5 lib/shivers/value_equality.rb
shivers-0.6.0.pre.4 lib/shivers/value_equality.rb
shivers-0.6.0.pre.3 lib/shivers/value_equality.rb