protected Method

Options.parse!(args, runtime_options = {})

Parse arguments into the options hash. Classes may customize parsing behavior by overriding these methods:

#banner                 Usage: ./script/generate [options]
#add_options!           Options:
                          some options..
#add_general_options!   General Options:
                          general options..

Source Code

# File rails_generator/options.rb, line 81
def parse!(args, runtime_options = {})
  self.options = {}

  @option_parser = OptionParser.new do |opt|
    opt.banner = banner
    add_options!(opt)
    add_general_options!(opt)
    opt.parse!(args)
  end

  return args
ensure
  self.options = full_options(runtime_options)
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.