= private = protected
add?(o)
Adds the given object to the set and returns self. If the object is already in the set, returns nil.
Set[1, 2].add?(3) #=> #<Set: {1, 2, 3}> Set[1, 2].add?([3, 4]) #=> #<Set: {1, 2, [3, 4]}> Set[1, 2].add?(2) #=> nil
# File lib/set.rb, line 360 def add?(o) add(o) unless include?(o) end