public Method

Set.subtract(enum)

Deletes every element that appears in the given enumerable object and returns self.

Source Code

# File set.rb, line 266
def subtract(enum)
  enum.is_a?(Enumerable) or raise ArgumentError, "value must be enumerable"
  enum.each { |o| delete(o) }
  self
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.