public Method

Set.flatten!

Equivalent to Set#flatten, but replaces the receiver with the result in place. Returns nil if no modifications were made.

Source Code

# File set.rb, line 144
def flatten!
  if detect { |e| e.is_a?(Set) }
    replace(flatten())
  else
    nil
  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.