Sha256: 51f3f8f49dd46619defce20ff9e0c140f5fd339d67306e843d7f23c47b9b3321
Contents?: true
Size: 436 Bytes
Versions: 18
Compression:
Stored size: 436 Bytes
Contents
module Steep module Equatable def ==(other) if other.class == self.class instance_variables.all? do |name| other.instance_variable_get(name) == instance_variable_get(name) end end end def eql?(other) self == other end def hash instance_variables.inject(self.class.hash) do |hash, name| hash ^ instance_variable_get(name).hash end end end end
Version data entries
18 entries across 18 versions & 1 rubygems