Class: Dctl::Command::StartCommand

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



44
45
46
# File 'lib/dctl/command.rb', line 44

def description
  'Start a new daemonized instance of a specified application.'
end

#execute(cmd_parser, args) ⇒ Object



48
49
50
51
52
# File 'lib/dctl/command.rb', line 48

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