Class: Backlog::Help
- Inherits:
-
Object
- Object
- Backlog::Help
- Defined in:
- lib/backlog/help.rb
Class Method Summary collapse
Instance Method Summary collapse
- #execute! ⇒ Object
-
#initialize(cli_args, *args) ⇒ Help
constructor
A new instance of Help.
- #print_help(command_class) ⇒ Object
Constructor Details
#initialize(cli_args, *args) ⇒ Help
Returns a new instance of Help.
4 5 6 |
# File 'lib/backlog/help.rb', line 4 def initialize(cli_args, *args) end |
Class Method Details
.help ⇒ Object
21 22 23 24 25 26 27 |
# File 'lib/backlog/help.rb', line 21 def self.help() return <<-eos Help: Print this menu eos end |
Instance Method Details
#execute! ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/backlog/help.rb', line 8 def execute! = "Version: #{VERSION}" puts "#{}\n#{(0...length).map{"-"}.join}" # run the command as needed CLI.commands.each do |command, command_class| print_help command_class end end |
#print_help(command_class) ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/backlog/help.rb', line 29 def print_help(command_class) if defined? command_class.help help = command_class.help puts help end end |