Erubis Users' Guide

7   Command Reference

7-1   Usage

erubis [..options..] [file ...]

7-2   Options

-h, --help
Release version.
Show compiled source.
Show compiled source but only Ruby code. This is equivarent to '-E NoText'.
Numbering: add line numbers. (for '-x/-X')
Unique mode: zip empty lines into a line. (for '-x/-X')
Compact: remove empty lines. (for '-x/-X')
Body only: no preamble nor postamble. (for '-x/-X') This is equivarent to '--preamble=false --postamble=false'.
Syntax checking.
Escape. This is equivarent to '-E Escape'.
-p pattern
Embedded pattern (default '<% %>'). This is equivarent to '--pattern=pattern'.
-l lang
Language name. This option makes erubis command to compile script but no execute.
-E enhacers
Enhancer name (Escape, PercentLine, ...). It is able to specify several enhancer name separating with ',' (ex. -f Escape,PercentLine,HeaderFooter).
-I path
Require library path ($:). It is able to specify several paths separating with ',' (ex. -f path1,path2,path3).
-K kanji
Kanji code (euc, sjis, utf8, or none) (default none).
-f datafile
Context data file in YAML format ('*.yaml', '*.yml') or Ruby script ('*.rb'). It is able to specify several filenames separating with ',' (ex. -f file1,file2,file3).
-c context
Context data string in YAML inline style or Ruby code.
Don't expand tab characters in YAML file.
Convert mapping key from string to symbol in YAML file.
invoke Eruby#result() instead of Eruby#evaluate()
parse '<?name ... ?>' instead of '<% ... %>'
No trimming spaces around '<% %>'.

7-3   Properties

Some Eruby classes can take optional properties to change it's compile option. For example, property '--indent=" "' may change indentation of compiled source code. Try 'erubis -h' for details.