public Method

Set.add?(o)

Adds the given object to the set and returns self. If the object is already in the set, returns nil.

Source Code

# File set.rb, line 203
def add?(o)
  if include?(o)
    nil
  else
    add(o)
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.