Class used to handle punctuations (., -, etc.)
Return string with code to cache punctuation in Getopt::Declare's cache
# File lib/Getopt/Declare.rb, line 434 def cachecode(ownerflag, itemcount) if itemcount > 1 " @cache['#{ownerflag}']['#{@text}'] = _PUNCT_['#{@text}']\n" else " unless @cache['#{ownerflag}']\n" + " @cache['#{ownerflag}'] = _PUNCT_['#{@text}'] || 1\n" + " end\n" end end
Return string with code to process punctuation
# File lib/Getopt/Declare.rb, line 420 def code(*t) if t[0] pos1 = t[0].to_s else pos1 = '0' end " if @@m[#{pos1}] && !@@m[#{pos1}].empty? _PUNCT_['#{@text}'] = @@m[#{pos1}] end " end
Return regex that matches this punctuation
# File lib/Getopt/Declare.rb, line 415 def matcher(g) Arg::negflagpat + Regexp::quote(@text) end
Generated with the Darkfish Rdoc Generator 2.