Class: Dctl::Command::RestartCommand

Inherits:
RedirectibleCommand show all
Defined in:
lib/dctl/command.rb

Instance Method Summary collapse

Methods inherited from RedirectibleCommand

#initialize

Methods inherited from SmartCommand

#initialize

Constructor Details

This class inherits a constructor from Dctl::Command::RedirectibleCommand

Instance Method Details

#descriptionObject



56
57
58
# File 'lib/dctl/command.rb', line 56

def description
  'Restart a daemonized instance of a specified application with new arguments.'
end

#execute(cmd_parser, args) ⇒ Object



60
61
62
63
64
# File 'lib/dctl/command.rb', line 60

def execute(cmd_parser, args)
  cmd_args = args.slice! 1, args.length
  cmd = args[0] || raise(OptionParser::MissingArgument)
  Dctl::Daemon.new(cmd, $DIR).restart(cmd_args, @stdin, @stdout, @stderr)
end