Class: HammerCLI::FullHelpCommand::TxtAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/hammer_cli/full_help.rb

Instance Method Summary collapse

Instance Method Details

#command_name(parent, command_name) ⇒ Object



67
68
69
# File 'lib/hammer_cli/full_help.rb', line 67

def command_name(parent, command_name)
  "#{parent} > #{command_name}"
end


71
72
73
74
75
76
77
# File 'lib/hammer_cli/full_help.rb', line 71

def print_command(name, description, help)
  print_heading(name, 2)
  puts description
  puts
  puts help
  puts
end


82
83
84
85
86
# File 'lib/hammer_cli/full_help.rb', line 82

def print_heading(text, level=1)
  ch = (level > 1) ? '-' : '='
  puts text
  puts ch * text.length
end


79
80
# File 'lib/hammer_cli/full_help.rb', line 79

def print_toc(cmd)
end