Erubis Users' Guide
7 Command Reference
7-1 Usage
erubis [..options..] [file ...]
7-2 Options
- -h, --help
- Help.
- -v
- Release version.
- -x
- Show compiled source.
- -X
- Show compiled source but only Ruby code. This is equivarent to '-E NoText'.
- -N
- Numbering: add line numbers. (for '-x/-X')
- -U
- Unique mode: zip empty lines into a line. (for '-x/-X')
- -C
- Compact: remove empty lines. (for '-x/-X')
- -b
- Body only: no preamble nor postamble. (for '-x/-X') This is equivarent to '--preamble=false --postamble=false'.
- -z
- Syntax checking.
- -e
- 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.
- -T
- Don't expand tab characters in YAML file.
- -S
- Convert mapping key from string to symbol in YAML file.
- -B
- invoke Eruby#result() instead of Eruby#evaluate()
- --pi[=name]
- parse '<?name ... ?>' instead of '<% ... %>'
- --trim=false
- 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.