Class: Trooper::Actions::DefaultAction
- Inherits:
-
Trooper::Action
- Object
- Trooper::Action
- Trooper::Actions::DefaultAction
- Defined in:
- lib/trooper/actions/default_action.rb
Direct Known Subclasses
CloneRepositoryAction, InstallGemsAction, MigrateDatabaseAction, PrecompileAssetsAction, PreparePrerequisiteAction, RestartServerAction, RollbackMigrateAction, SetupDatabaseAction, SetupTrooperAction, UpdateRepositoryAction
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
Attributes inherited from Trooper::Action
#block, #commands, #config, #description, #name, #options
Instance Method Summary collapse
-
#initialize(config = {}) ⇒ DefaultAction
constructor
A new instance of DefaultAction.
-
#ok? ⇒ Boolean
Always returns true because default actions are loaded before the troopfile, so varibles will always be missing.
Methods inherited from Trooper::Action
#call, #method_missing, #prerequisite_call, #reset_commands!, #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
#initialize(config = {}) ⇒ DefaultAction
Returns a new instance of DefaultAction.
19 20 21 22 23 24 25 26 |
# File 'lib/trooper/actions/default_action.rb', line 19 def initialize(config = {}) @name = self.class.config[:name] @description = self.class.config[:description] @options = self.class.config[:options] || {} @config = config @call_count = 0 @commands = [] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Trooper::Action
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
9 10 11 |
# File 'lib/trooper/actions/default_action.rb', line 9 def config @config end |
Instance Method Details
#ok? ⇒ Boolean
Always returns true because default actions are loaded before the troopfile, so varibles will always be missing.
31 32 33 |
# File 'lib/trooper/actions/default_action.rb', line 31 def ok? true end |