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



706
707
708
709
710
711
712
713
714
715
# File 'lib/wakame/runner/administrator_command.rb', line 706

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



717
718
719
# File 'lib/wakame/runner/administrator_command.rb', line 717

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