Class: Requestkit::CLI

Inherits:
Object
  • Object
show all
Defined in:
lib/requestkit/cli.rb

Class Method Summary collapse

Class Method Details

.start(arguments) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/requestkit/cli.rb', line 6

def start(arguments)
  command = arguments[0]

  case command
  when "server", nil
    start_server with: arguments
  when "help", "--help", "-h"
    output_help
  else
    puts "Unknown command: #{command}"
    puts "Run `requestkit help` for usage information"

    exit 1
  end
end