public Method

Set.collect!() { |o| ... }

Do collect() destructively.

Source Code

# File set.rb, line 236
def collect!
  set = self.class.new
  each { |o| set << yield(o) }
  replace(set)
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.