Class: VagrantShellCommander::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-shell-commander/command.rb

Overview

Main plugin command

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#envObject

Returns the value of attribute env.



4
5
6
# File 'lib/vagrant-shell-commander/command.rb', line 4

def env
  @env
end

Instance Method Details

#executeObject

Main entry point of this command



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/vagrant-shell-commander/command.rb', line 8

def execute
  cli_options = OptionManager.new.execute
  argv = parse_options(cli_options[:parser])
  
  return unless argv
  
  with_target_vms(argv) do |machine|
    manage_machine(machine, cli_options) 
  end

  0
end