Class: VagrantHostel::Command
- Inherits:
-
Object
- Object
- VagrantHostel::Command
- Defined in:
- lib/vagrant-hostel/command.rb
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant-hostel/command.rb', line 3 def execute = {} [:force] = false opts = OptionParser.new do |o| o. = "Usage: vagrant hostel [vm-name] [no. to replicate]" o.separator "" end # Parse the options argv = (opts) puts "Hostel: #{argv}" vm_name = argv[0] multiple = argv[1] puts "#{@env.methods}" with_target_vms(vm_name) do |vm| puts "#{vm.config.vm.host_name}" end 0 end |