Class: VagrantPlugins::DevCommands::Command
- Inherits:
-
Object
- Object
- VagrantPlugins::DevCommands::Command
- Defined in:
- lib/vagrant/devcommands/command.rb
Overview
Defines the executable vagrant command
Constant Summary collapse
- I18N_KEY =
'vagrant_devcommands.'
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
9 10 11 12 13 |
# File 'lib/vagrant/devcommands/command.rb', line 9 def self.synopsis synopsis = VagrantPlugins::DevCommands::SYNOPSIS synopsis[0, 1].downcase + synopsis[1..-1] end |
Instance Method Details
#execute ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/vagrant/devcommands/command.rb', line 21 def execute return 127 unless read_commandfile 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
34 35 36 37 |
# File 'lib/vagrant/devcommands/command.rb', line 34 def proxy_with_target_vms(names = nil, = nil, &block) # allows public access to protected method with_target_vms with_target_vms(names, , &block) end |