Class: HelpOutput

Inherits:
RubyUtils::BaseHelpOutput
  • Object
show all
Defined in:
lib/output/help_output.rb

Overview

Output class for help text

Class Method Summary collapse

Class Method Details

.add_one_argument_help_entriesObject (private)

method to specify and add the help entries with help text and one argument



16
17
18
19
20
# File 'lib/output/help_output.rb', line 16

def self.add_one_argument_help_entries
  add_single_argument_text(:index, " -i, --index     ", " <index>",
        "; specifies the index that should be created")
  nil
end

.add_single_help_entriesObject (private)

method to specify and add the help entries with help text only



11
12
13
# File 'lib/output/help_output.rb', line 11

def self.add_single_help_entries
  nil
end

.add_two_argument_help_entriesObject (private)

method to specify and add the help entries with help text and two arguments



23
24
25
# File 'lib/output/help_output.rb', line 23

def self.add_two_argument_help_entries
  nil
end

.get_script_nameObject (private)

method to set the name of the script project



52
53
54
# File 'lib/output/help_output.rb', line 52

def self.get_script_name
  "nginx_statistic"
end

method to print the available configuration parameter



42
43
44
45
46
47
48
49
# File 'lib/output/help_output.rb', line 42

def self.print_configuration_parameter
  puts "Available index criteria:".light_yellow
  puts "--request".light_blue + "   create index based on the http request"
  print "--status".light_blue
  puts "    create index based on the http status " + "(default)".yellow
  puts "--source".light_blue + "    create index based on the source address"
  puts "--timestamp".light_blue + " create index based on the timestamp"
end

method to print the header of the help output



28
29
30
31
32
33
34
# File 'lib/output/help_output.rb', line 28

def self.print_help_head
  puts "script usage:".red + " ruby <script> [parameters] <filename>"
  puts "help usage :".green + "              ruby <script> (-h | --help)"
  puts "help usage for parameter:".green +
       " ruby <script> <parameter> (-h | --help)"
  puts "#{get_script_name} help:".light_yellow
end

method to print the invalid parameter combinations



37
38
39
# File 'lib/output/help_output.rb', line 37

def self.print_invalid_combinations
  nil
end