Class: Smith::Commands::Stop

Inherits:
Smith::CommandBase show all
Includes:
Common
Defined in:
lib/smith/commands/agency/stop.rb

Instance Attribute Summary

Attributes inherited from Smith::CommandBase

#options, #target

Instance Method Summary collapse

Methods included from Common

#agent_group

Methods inherited from Smith::CommandBase

#banner, #format_help, #initialize, #parse_options

Methods included from Logger

included

Constructor Details

This class inherits a constructor from Smith::CommandBase

Instance Method Details

#executeObject



11
12
13
14
15
16
17
# File 'lib/smith/commands/agency/stop.rb', line 11

def execute
  if target.first == 'agency' || target.first == 'all'
    send("stop_#{target.first}") { |ret| responder.succeed(ret) }
  else
    stop_agent { |ret| responder.succeed(ret) }
  end
end