Class: VagrantPlugins::DevCommands::InternalCommand::Help
- Inherits:
-
Object
- Object
- VagrantPlugins::DevCommands::InternalCommand::Help
- Defined in:
- lib/vagrant/devcommands/internal_command/help.rb
Overview
Internal “help” command
Constant Summary collapse
- I18N_KEY =
'vagrant_devcommands.internal.help'
- UTIL =
VagrantPlugins::DevCommands::Util
- MESSAGES =
VagrantPlugins::DevCommands::Messages
- PRINTER =
VagrantPlugins::DevCommands::HelpPrinter
Instance Method Summary collapse
- #execute(argv) ⇒ Object
-
#initialize(env, registry) ⇒ Help
constructor
A new instance of Help.
Constructor Details
#initialize(env, registry) ⇒ Help
Returns a new instance of Help.
13 14 15 16 |
# File 'lib/vagrant/devcommands/internal_command/help.rb', line 13 def initialize(env, registry) @env = env @registry = registry end |
Instance Method Details
#execute(argv) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/vagrant/devcommands/internal_command/help.rb', line 18 def execute(argv) return (:no_commands) if @registry.commands.empty? command = argv[0] return plugin_help(command) unless @registry.available?(command) return internal_help(command) if @registry.reserved_command?(command) help(command) end |