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

UTIL =
VagrantPlugins::DevCommands::Util
MESSAGES =
VagrantPlugins::DevCommands::Messages

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ Command

Returns a new instance of Command.



9
10
11
# File 'lib/vagrant/devcommands/help_printer/command.rb', line 9

def initialize(env)
  @env = env
end

Instance Method Details

#output(command) ⇒ Object



13
14
15
16
17
18
# File 'lib/vagrant/devcommands/help_printer/command.rb', line 13

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