Class: EnvironmentInformation::Commandline
- Defined in:
- lib/environment_information/commandline/commandline.rb
Overview
EnvironmentInformation::Commandline
Constant Summary collapse
- NAMESPACE =
#
NAMESPACE
#
inspect
Constants inherited from Base
Class Method Summary collapse
-
.[](i = ARGV) ⇒ Object
# === EnvironmentInformation::Commandline[] ========================================================================= #.
Instance Method Summary collapse
-
#initialize(commandline_arguments = nil, run_already = true) ⇒ Commandline
constructor
# === initialize ========================================================================= #.
-
#menu(i = commandline_arguments? ) ⇒ Object
# === menu ========================================================================= #.
-
#report_version ⇒ Object
# === report_version ========================================================================= #.
-
#reset ⇒ Object
# === reset (reset tag) ========================================================================= #.
-
#run ⇒ Object
# === run (run tag) ========================================================================= #.
Methods inherited from Base
#be_silent, #be_silent?, #be_verbose?, #blue, #cd, #col1, #commandline_arguments?, #crimson, #cyan, #darkgreen, #darkolivegreen, #dimgray, #disable_colours, #e, #enable_colours, #esystem, #first_argument?, #gold, #is_on_roebe?, #is_rbt_available?, #lightblue, #lightgreen, #lightseagreen, #limegreen, #load_dataset_from_this_file, #log_dir?, #mediumaquamarine, #mediumpurple, #olive, #olivedrab, #opne, #orange, #register_sigint, #return_very_silent_system_output_from, #rev, #royalblue, #sanitize_this_version_string, #seagreen, #set_be_silent, #set_be_verbose, #set_commandline_arguments, #set_use_colours, #sfancy, #sfile, #simp, #slateblue, #steelblue, #teal, #tomato, #tracked_programs?, #true_rev, #use_colours?, #write_what_into
Constructor Details
#initialize(commandline_arguments = nil, run_already = true) ⇒ Commandline
#
initialize
#
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/environment_information/commandline/commandline.rb', line 30 def initialize( commandline_arguments = nil, run_already = true ) reset set_commandline_arguments( commandline_arguments ) run if run_already end |
Class Method Details
.[](i = ARGV) ⇒ Object
#
EnvironmentInformation::Commandline[]
#
112 113 114 |
# File 'lib/environment_information/commandline/commandline.rb', line 112 def self.[](i = ARGV) new(i) end |
Instance Method Details
#menu(i = commandline_arguments? ) ⇒ Object
#
menu
#
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/environment_information/commandline/commandline.rb', line 55 def ( i = commandline_arguments? ) if i.is_a? Array i.each {|entry| (entry) } else case i # case tag # ====================================================================== # # === envi --gui # ====================================================================== # when /^-?-?gui$/i, /^-?-?gtk$/i, /^-?-?start(-|_)?gtk$/i start_gtk_component # ====================================================================== # # === envi --compare # ====================================================================== # when *ARRAY_COMPARE_PROGRAM_VERSIONS ::EnvironmentInformation.show_all_available_components( ['--compare-program-versions'] ) # ====================================================================== # # === envi --version? # ====================================================================== # when *ARRAY_VERSION report_version # ====================================================================== # # === envi --replay # # The replay-functionality can be used to display information # quickly, by reading the dataset from a local file. # ====================================================================== # when /^-?-?replay$/i replay_from_the_stored_file else EnvironmentInformation.test end end end |
#report_version ⇒ Object
#
report_version
#
105 106 107 |
# File 'lib/environment_information/commandline/commandline.rb', line 105 def report_version ::EnvironmentInformation.report_version end |
#reset ⇒ Object
#
reset (reset tag)
#
44 45 46 47 48 49 50 |
# File 'lib/environment_information/commandline/commandline.rb', line 44 def reset super() if respond_to?(:super) # ======================================================================= # # === @namespace # ======================================================================= # @namespace = NAMESPACE end |
#run ⇒ Object
#
run (run tag)
#
98 99 100 |
# File 'lib/environment_information/commandline/commandline.rb', line 98 def run end |