Class: Kiq::Display
- Inherits:
-
Object
- Object
- Kiq::Display
- Defined in:
- lib/kiq/helpers/display.rb
Overview
Displays help to the user
Class Method Summary collapse
-
.command_help(command) ⇒ String
Returns the command help center.
-
.help ⇒ String
Returns the full help center.
Class Method Details
.command_help(command) ⇒ String
Returns the command help center
25 26 27 28 29 30 |
# File 'lib/kiq/helpers/display.rb', line 25 def self.command_help(command) puts 'NAME' puts Kiq::SPACES + Kiq::TITLE_HASH['NAME'] puts 'SYNOPSIS' puts Kiq::SPACES + command + Kiq::SPACES + Kiq::COMMAND_HASH[command][1] end |
.help ⇒ String
Returns the full help center
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/kiq/helpers/display.rb', line 6 def self.help Kiq::TITLE_HASH.keys.each do |key| puts key puts Kiq::SPACES + Kiq::TITLE_HASH[key] end puts 'GLOBAL OPTIONS' puts Kiq::SPACES + Kiq::GLOBAL_COMMAND puts "COMMANDS" Kiq::COMMAND_HASH.keys.each do |key| puts Kiq::SPACES + key + Kiq::COMMAND_HASH[key][0] end puts "\n" end |