Class: VagrantWizard::Commands::WizardCommand
- Inherits:
-
Object
- Object
- VagrantWizard::Commands::WizardCommand
- Defined in:
- lib/vagrant-wizard/commands/wizard.rb
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(argv, env) ⇒ WizardCommand
constructor
A new instance of WizardCommand.
Constructor Details
#initialize(argv, env) ⇒ WizardCommand
Returns a new instance of WizardCommand.
14 15 16 17 18 19 20 21 |
# File 'lib/vagrant-wizard/commands/wizard.rb', line 14 def initialize(argv, env) @env = env @config = @env.vagrantfile.config.wizard @advanced = false if argv.include?("--advanced") || argv.include?('-a') @advanced = true end end |
Class Method Details
.synopsis ⇒ Object
23 24 25 |
# File 'lib/vagrant-wizard/commands/wizard.rb', line 23 def self.synopsis 'interactively creates configuration file' end |
Instance Method Details
#execute ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/vagrant-wizard/commands/wizard.rb', line 27 def execute promptDisplay = PromptDisplay.new promptDisplay.wizard_path = @config.wizard_path promptDisplay.defaults_path = @config.defaults_path promptDisplay.presets_dir_path = @config.presets_dir_path promptDisplay.config_path = @config.config_path promptDisplay.prompt_presets = @config.prompt_presets promptDisplay.prompt_overwrite = @config.prompt_overwrite promptDisplay.advanced = @advanced promptDisplay.display end |