Class: Smith::Commands::Stop
- Inherits:
-
Smith::CommandBase
- Object
- Smith::CommandBase
- Smith::Commands::Stop
- Includes:
- Common
- Defined in:
- lib/smith/commands/agency/stop.rb
Instance Attribute Summary
Attributes inherited from Smith::CommandBase
Instance Method Summary collapse
Methods included from Common
Methods inherited from Smith::CommandBase
#banner, #format_help, #initialize, #parse_options
Methods included from Logger
Constructor Details
This class inherits a constructor from Smith::CommandBase
Instance Method Details
#execute ⇒ Object
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 |