Sha256: 11dd28fd90a3a82b00e7d2b7b3b50612b4feb5091a33fe236d6f417599f49afb
Contents?: true
Size: 414 Bytes
Versions: 9
Compression:
Stored size: 414 Bytes
Contents
module DuckPuncher class UniqueDuck < DelegateClass(Duck) attr_accessor :punch_options # # Required to play nice in a Set # def eql?(other) "#{target}-#{mod}" == "#{other.target}-#{other.mod}" end def hash target.to_s.hash + mod.to_s.hash + punch_options.to_s.hash end # # Sorting # def <=>(other) target <=> other.target end end end
Version data entries
9 entries across 9 versions & 1 rubygems