Sha256: 0fbeeacc2d6a4723e815b7f31294254be3d5796a43b069495fd96ec0f2b35a15

Contents?: true

Size: 233 Bytes

Versions: 8

Compression:

Stored size: 233 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, state].hash
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shivers-0.6.0.pre.15 lib/shivers/value_equality.rb
shivers-0.6.0.pre.14 lib/shivers/value_equality.rb
shivers-0.6.0.pre.13 lib/shivers/value_equality.rb
shivers-0.6.0.pre.12 lib/shivers/value_equality.rb
shivers-0.6.0.pre.11 lib/shivers/value_equality.rb
shivers-0.6.0.pre.10 lib/shivers/value_equality.rb
shivers-0.6.0.pre.9 lib/shivers/value_equality.rb
shivers-0.6.0.pre.8 lib/shivers/value_equality.rb