Class: EnvironmentInformation::Commandline
- Inherits:
-
Base
- Object
- Base
- EnvironmentInformation::Commandline
show all
- Defined in:
- lib/environment_information/commandline/commandline.rb
Overview
Constant Summary
collapse
- NAMESPACE =
inspect
Constants inherited
from Base
Base::TRY_TO_USE_HTML_COLOURS
Class Method Summary
collapse
Instance Method Summary
collapse
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
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
112
113
114
|
# File 'lib/environment_information/commandline/commandline.rb', line 112
def self.[](i = ARGV)
new(i)
end
|
Instance Method Details
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 when /^-?-?gui$/i,
/^-?-?gtk$/i,
/^-?-?start(-|_)?gtk$/i
start_gtk_component
when *ARRAY_COMPARE_PROGRAM_VERSIONS
::EnvironmentInformation.show_all_available_components(
['--compare-program-versions']
)
when *ARRAY_VERSION
report_version
when /^-?-?replay$/i
replay_from_the_stored_file
else
EnvironmentInformation.test
end
end
end
|
#reset ⇒ Object
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
end
|
#run ⇒ Object
98
99
100
|
# File 'lib/environment_information/commandline/commandline.rb', line 98
def run
end
|