class Erubis::Main
def usage(command=nil)
def usage(command=nil) command ||= File.basename($0) buf = [] buf << "erubis - embedded program converter for multi-language" buf << "Usage: #{command} [..options..] [file ...]" buf << " -h, --help : help" buf << " -v : version" buf << " -x : show converted code" buf << " -X : show converted code, only ruby code and no text part" buf << " -N : numbering: add line numbers (for '-x/-X')" buf << " -U : unique: compress empty lines to a line (for '-x/-X')" buf << " -C : compact: remove empty lines (for '-x/-X')" buf << " -b : body only: no preamble nor postamble (for '-x/-X')" buf << " -z : syntax checking" buf << " -e : escape (equal to '--E Escape')" buf << " -p pattern : embedded pattern (default '<% %>')" buf << " -l lang : convert but no execute (ruby/php/c/cpp/java/scheme/perl/js)" buf << " -E e1,e2,... : enhancer names (Escape, PercentLine, BiPattern, ...)" buf << " -I path : library include path" buf << " -K kanji : kanji code (euc/sjis/utf8) (default none)" buf << " -c context : context data string (yaml inline style or ruby code)" buf << " -f datafile : context data file ('*.yaml', '*.yml', or '*.rb')" #buf << " -t : expand tab characters in YAML file" buf << " -T : don't expand tab characters in YAML file" buf << " -S : convert mapping key from string to symbol in YAML file" buf << " -B : invoke 'result(binding)' instead of 'evaluate(context)'" buf << " --pi=name : parse '<?name ... ?>' instead of '<% ... %>'" #' # -T : don't trim spaces around '<% %>' # -c class : class name (XmlEruby/PercentLineEruby/...) (default Eruby) # -r library : require library # -a : action (convert/execute) return buf.join("\n") end