Flowdock
add?(o) public

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
Show source
Register or log in to add new notes.