Class: Wakame::Cli::Subcommand::StartService

Inherits:
Object
  • Object
show all
Includes:
Wakame::Cli::Subcommand
Defined in:
lib/wakame/runner/administrator_command.rb

Instance Method Summary collapse

Methods included from Wakame::Cli::Subcommand

#create_parser, included, #print_result

Instance Method Details

#parse(args) ⇒ Object



609
610
611
612
613
614
615
616
617
618
# File 'lib/wakame/runner/administrator_command.rb', line 609

def parse(args)
  @params = {}
  cmd = create_parser(args) { |opts|
    opts.banner = "Usage: start_service [options] \"Service ID\""
    opts.separator ""
    opts.separator "options:"
  }
  service_id = args.shift || abort("[ERROR]: Service ID was not given")
  @params[:service_id] = service_id
end

#run(requester) ⇒ Object



620
621
622
# File 'lib/wakame/runner/administrator_command.rb', line 620

def run(requester)
  requester.request(@params)
end