Class: Dctl::Command::StopCommand

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

Instance Method Summary collapse

Methods inherited from NonRedirectibleCommand

#initialize

Methods inherited from SmartCommand

#initialize

Constructor Details

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

Instance Method Details

#descriptionObject



68
69
70
# File 'lib/dctl/command.rb', line 68

def description
  'Stop a daemonized instance of a specified application.'
end

#execute(cmd_parser, args) ⇒ Object



72
73
74
75
# File 'lib/dctl/command.rb', line 72

def execute(cmd_parser, args)
  cmd = args[0] || raise(OptionParser::MissingArgument)
  Dctl::Daemon.new(cmd, $DIR).stop
end