11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/argv/cms.rb', line 11
def help_msg
helper_sym= [:helper,:help,:h]
self.add_help_msg "This will show you the help msg (this)",*helper_sym
unless ::ARGV.sym_flags.select{ |e| helper_sym.include?(e) }.empty?
tmp_ary= []
@@help_msg_obj.each{ |ary|
tmp_ary.push(ary[0])
ary[1].each{|e| tmp_ary.push( ( e.to_s.length == 1 ? "-#{e}" : "--#{e}" ) )}
tmp_ary.push("")
}
tmp_ary.each{ |element| element.include?('--') ? element.gsub!('--',"\t--") : element.gsub!('-',"\t -")}
puts "",tmp_ary.join("\n"),""
Process.exit!
end
end
|