Class: CertBot::HelpOutput
- Inherits:
-
RubyUtils::BaseHelpOutput
- Object
- RubyUtils::BaseHelpOutput
- CertBot::HelpOutput
- Defined in:
- lib/cert_bot/help/help_output.rb
Overview
Output class for help text
Class Method Summary collapse
-
.add_one_argument_help_entries ⇒ Object
private
method to specify and add the help entries with help text and one argument.
-
.add_single_help_entries ⇒ Object
private
method to specify and add the help entries with help text only.
-
.add_two_argument_help_entries ⇒ Object
private
method to specify and add the help entries with help text and two arguments.
-
.get_script_name ⇒ Object
private
method to set the name of the script project.
-
.print_configuration_parameter ⇒ Object
private
method to print the available configuration parameter.
-
.print_help_head ⇒ Object
private
method to print the header of the help output.
-
.print_invalid_combinations ⇒ Object
private
method to print the invalid parameter combinations.
Class Method Details
.add_one_argument_help_entries ⇒ Object (private)
method to specify and add the help entries with help text and one argument
20 21 22 23 24 25 26 27 28 |
# File 'lib/cert_bot/help/help_output.rb', line 20 def self.add_one_argument_help_entries add_single_argument_text(:file, " -f, --file ", " <filename>", "; parameter that indicates a filepath to the config json file") add_single_argument_text(:severity, " -s, --severity ", " <severity>", "; specifies the severity threshold when a severity should sent an e-mail") add_single_argument_text(:json, " -j, --json ", " <filepath>", "; writes advisories as json objects into a file instead of sending an e-mail to the given directory") nil end |
.add_single_help_entries ⇒ Object (private)
method to specify and add the help entries with help text only
11 12 13 14 15 16 17 |
# File 'lib/cert_bot/help/help_output.rb', line 11 def self.add_single_help_entries add_simple_text(:updated, " -u, --updated ", "also sends an e-mail for updated advisories") add_simple_text(:debug, " -d, --debug ", "script call does additional debug logging") nil end |
.add_two_argument_help_entries ⇒ Object (private)
method to specify and add the help entries with help text and two arguments
31 32 33 |
# File 'lib/cert_bot/help/help_output.rb', line 31 def self.add_two_argument_help_entries nil end |
.get_script_name ⇒ Object (private)
method to set the name of the script project
55 56 57 |
# File 'lib/cert_bot/help/help_output.rb', line 55 def self.get_script_name "CERT bot" end |
.print_configuration_parameter ⇒ Object (private)
method to print the available configuration parameter
50 51 52 |
# File 'lib/cert_bot/help/help_output.rb', line 50 def self.print_configuration_parameter nil end |
.print_help_head ⇒ Object (private)
method to print the header of the help output
36 37 38 39 40 41 42 |
# File 'lib/cert_bot/help/help_output.rb', line 36 def self.print_help_head puts "script usage:".red + " ruby <script> [parameters] -f <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 |
.print_invalid_combinations ⇒ Object (private)
method to print the invalid parameter combinations
45 46 47 |
# File 'lib/cert_bot/help/help_output.rb', line 45 def self.print_invalid_combinations nil end |