Class: Trooper::Actions::RestartServerAction
- Inherits:
-
Trooper::Action
- Object
- Trooper::Action
- Trooper::Actions::RestartServerAction
- Defined in:
- lib/trooper/actions/restart_server_action.rb
Instance Attribute Summary
Attributes inherited from Trooper::Action
#block, #commands, #config, #description, #name, #options
Instance Method Summary (collapse)
- - (Object) call(configuration)
-
- (RestartServerAction) initialize(config = {})
constructor
A new instance of RestartServerAction.
Methods inherited from Trooper::Action
#method_missing, #ok?, #prerequisite_call, #run, #type
Methods included from DSL::Bundler
#bundle_exec, #bundle_install, #rake
Methods included from DSL::Rake
Methods included from DSL::Folders
#cd, #create_folder, #create_folders, #delete_folder
Constructor Details
- (RestartServerAction) initialize(config = {})
A new instance of RestartServerAction
8 9 10 11 12 13 |
# File 'lib/trooper/actions/restart_server_action.rb', line 8 def initialize(config = {}) @name = :restart_server @description = "Restart server" @config = config @commands = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Trooper::Action
Instance Method Details
- (Object) call(configuration)
15 16 17 18 19 |
# File 'lib/trooper/actions/restart_server_action.rb', line 15 def call(configuration) @config = configuration build_commands commands end |