Method: Gem::OptionParser#new

Defined in:
lib/rubygems/vendor/optparse/lib/optparse.rb

#newObject

Pushes a new List.

If a block is given, yields self and returns the result of the block, otherwise returns self.



1372
1373
1374
1375
1376
1377
1378
1379
# File 'lib/rubygems/vendor/optparse/lib/optparse.rb', line 1372

def new
  @stack.push(List.new)
  if block_given?
    yield self
  else
    self
  end
end