Class: Webcommand::CLI

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

Constant Summary collapse

SERVER_ADAPTERS =
{
  'webrick' =>  Webcommand::Server::Adapters::Webrick
}.freeze

Instance Method Summary collapse

Instance Method Details

#serverObject



12
13
14
15
16
17
# File 'lib/webcommand/cli.rb', line 12

def server
  server_adapter = SERVER_ADAPTERS[options[:adapter]]
  server = server_adapter.new(Webcommand::Server, options)

  server.start
end