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.
Constructor Details
Class Method Details
.synopsis ⇒ Object
5 6 7 |
# File 'lib/vagrant/devcommands/command.rb', line 5 def self.synopsis 'runs vagrant commands from a Commandfile' end |
Instance Method Details
#execute ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant/devcommands/command.rb', line 15 def execute return 127 unless read_commandfile command = argv_command return 127 unless check_command(command) return run_internal(command) if @registry.reserved_command?(command) run @registry.commands[command] end |