Class: Rack::App::CLI::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/app/cli/runner.rb

Constant Summary collapse

CommandNotFound =
Class.new(StandardError)

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Runner

Returns a new instance of Runner.



5
6
7
# File 'lib/rack/app/cli/runner.rb', line 5

def initialize(app)
  @cli = app.respond_to?(:cli) ? app.cli : Rack::App::CLI.new
end

Instance Method Details

#start(argv) ⇒ Object



9
10
11
12
# File 'lib/rack/app/cli/runner.rb', line 9

def start(argv)
  command_name = argv.shift
  start_command_for(command_name,argv)
end