class DuckPuncher::UniqueDuck
Attributes
punch_options[RW]
Public Instance Methods
<=>(other)
click to toggle source
Sorting
# File lib/duck_puncher/unique_duck.rb, line 21 def <=>(other) target <=> other.target end
eql?(other)
click to toggle source
Required to play nice in a Set
# File lib/duck_puncher/unique_duck.rb, line 9 def eql?(other) "#{target}-#{mod}" == "#{other.target}-#{other.mod}" end
hash()
click to toggle source
# File lib/duck_puncher/unique_duck.rb, line 13 def hash target.to_s.hash + mod.to_s.hash + punch_options.to_s.hash end