Class: VagrantPlugins::DevCommands::HelpPrinter::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant/devcommands/help_printer/command.rb

Overview

Prints help for a command

Constant Summary collapse

I18N_KEY =
'vagrant_devcommands.internal.help'
UTIL =
VagrantPlugins::DevCommands::Util
MESSAGES =
VagrantPlugins::DevCommands::Messages

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ Command

Returns a new instance of Command.



12
13
14
# File 'lib/vagrant/devcommands/help_printer/command.rb', line 12

def initialize(env)
  @env = env
end

Instance Method Details

#output(command) ⇒ Object



16
17
18
19
20
21
# File 'lib/vagrant/devcommands/help_printer/command.rb', line 16

def output(command)
  header(command)
  arguments(command.parameters, 'Parameters')
  arguments(command.flags, 'Flags')
  body(command.help)
end