Class: HammerCLIExperimental::FullHelpCommand::TxtAdapter
- Inherits:
-
Object
- Object
- HammerCLIExperimental::FullHelpCommand::TxtAdapter
- Defined in:
- lib/hammer_cli_experimental/full_help.rb
Instance Method Summary collapse
- #command_name(parent, command_name) ⇒ Object
- #print_command(name, description, help) ⇒ Object
- #print_heading(text, level = 1) ⇒ Object
- #print_toc(cmd) ⇒ Object
Instance Method Details
#command_name(parent, command_name) ⇒ Object
61 62 63 |
# File 'lib/hammer_cli_experimental/full_help.rb', line 61 def command_name(parent, command_name) "#{parent} > #{command_name}" end |
#print_command(name, description, help) ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/hammer_cli_experimental/full_help.rb', line 65 def print_command(name, description, help) print_heading(name, 2) puts description puts puts help puts end |
#print_heading(text, level = 1) ⇒ Object
76 77 78 79 80 |
# File 'lib/hammer_cli_experimental/full_help.rb', line 76 def print_heading(text, level=1) ch = (level > 1) ? '-' : '=' puts text puts ch * text.length end |
#print_toc(cmd) ⇒ Object
73 74 |
# File 'lib/hammer_cli_experimental/full_help.rb', line 73 def print_toc(cmd) end |