Class: Localeapp::CLI::Install
- Defined in:
- lib/localeapp/cli/install.rb
Defined Under Namespace
Classes: DefaultInstaller, GithubInstaller, HerokuInstaller, StandaloneInstaller
Instance Attribute Summary collapse
-
#config_type ⇒ Object
Returns the value of attribute config_type.
Instance Method Summary collapse
- #execute(key = nil) ⇒ Object
-
#initialize(args = {}) ⇒ Install
constructor
A new instance of Install.
- #installer(installer_class) ⇒ Object
Methods inherited from Command
#initialize_config, #load_config_file, #set_command_line_arguments
Constructor Details
#initialize(args = {}) ⇒ Install
Returns a new instance of Install.
6 7 8 9 |
# File 'lib/localeapp/cli/install.rb', line 6 def initialize(args = {}) super @config_type = :default end |
Instance Attribute Details
#config_type ⇒ Object
Returns the value of attribute config_type.
4 5 6 |
# File 'lib/localeapp/cli/install.rb', line 4 def config_type @config_type end |
Instance Method Details
#execute(key = nil) ⇒ Object
11 12 13 |
# File 'lib/localeapp/cli/install.rb', line 11 def execute(key = nil) installer("#{config_type.to_s.capitalize}Installer").execute(key) end |
#installer(installer_class) ⇒ Object
15 16 17 |
# File 'lib/localeapp/cli/install.rb', line 15 def installer(installer_class) self.class.const_get(installer_class).new(@output) end |