Class: VagrantPlugins::DevCommands::Command
- Inherits:
-
Object
- Object
- VagrantPlugins::DevCommands::Command
- Defined in:
- lib/vagrant/devcommands/command.rb
Overview
Defines the executable vagrant command
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(argv, env) ⇒ Command
constructor
A new instance of Command.
- #proxy_with_target_vms(names = nil, options = nil, &block) ⇒ Object
Constructor Details
Class Method Details
.synopsis ⇒ Object
5 6 7 8 9 |
# File 'lib/vagrant/devcommands/command.rb', line 5 def self.synopsis synopsis = VagrantPlugins::DevCommands::SYNOPSIS synopsis[0, 1].downcase + synopsis[1..-1] end |
Instance Method Details
#execute ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/vagrant/devcommands/command.rb', line 17 def execute return 127 unless read_commandfile deprecated_box_config? command = Util.argv_command(@argv, @env) return 127 unless non_empty?(command) return 127 unless available?(command) return run_internal(command) if @registry.reserved_command?(command) run command end |
#proxy_with_target_vms(names = nil, options = nil, &block) ⇒ Object
32 33 34 35 |
# File 'lib/vagrant/devcommands/command.rb', line 32 def proxy_with_target_vms(names = nil, = nil, &block) # allows public access to protected method with_target_vms with_target_vms(names, , &block) end |