Class: Vagrant::ShowInfo::Command
- Inherits:
-
Object
- Object
- Vagrant::ShowInfo::Command
- Defined in:
- lib/vagrant-commit/command.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/vagrant-commit/command.rb', line 69 def execute machines = {} with_target_vms() do |machine| machine_name = machine.name.to_s machines[machine_name] = get_machine_info(machine) end if machines.length == 1 answer = machines.values[0] else answer = machines end answer = JSON.pretty_generate(answer) @env.ui.info(answer) end |
#get_machine_info(machine) ⇒ Object
65 66 67 |
# File 'lib/vagrant-commit/command.rb', line 65 def get_machine_info(machine) {data_dir: machine.data_dir} end |