Class: VagrantWorkspace::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant_workspace/command.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.synopsisObject

Show description when ‘vagrant list-commands` is triggered



6
7
8
# File 'lib/vagrant_workspace/command.rb', line 6

def self.synopsis
  'plugin: vagrant_workspace: executes workspace files'
end

Instance Method Details

#executeObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/vagrant_workspace/command.rb', line 10

def execute
  _, workspace_file = ARGV

  with_target_vms do |machine|
    @env.action_runner.run(Action.run, {
      global_env: @env,
      machine: machine,
      workspace_file: workspace_file
    })
  end
end