module Oscar::Command::Helpers

Private Instance Methods

invoke_subcommand() click to toggle source
# File lib/oscar/command/helpers.rb, line 9
def invoke_subcommand
  if @subcommand and (klass = @subcommands.get(@subcommand))
    klass.new(@argv, @env).execute
  elsif @subcommand
    @env.ui.error "Unrecognized subcommand: #{@subcommand}"
    print_subcommand_help(:error)
  else
    print_subcommand_help
  end
end
print_subcommand_help(output = :info) click to toggle source
split_argv() click to toggle source
# File lib/oscar/command/helpers.rb, line 5
def split_argv
  @main_args, @subcommand, @sub_args = split_main_and_subcommand(@argv)
end