Walrus is a free (open source) Object-Oriented templating engine written in Ruby. Plain text templates are compiled down to Ruby code; final output is produced by executing ("filling") the compiled templates.
Standard object-oriented patterns can be used to maximize re-use and minimize repetition, and custom behavior such as targeting multiple output formats from a single source template can be added using custom Ruby methods.
walrus command line tool is included to make compiling and filling templates easy.
Walrus currently only supports Ruby 1.8, although Ruby 1.9 compatibility work is underway. JRuby is not yet officially supported, but some operations (notably batch compilation of large numbers of files using
jruby -S walrus compile ...) have been successfully tested.
$ sudo gem install walrus
- Test-Driven Development
- Writing a parser generator in Ruby
- Progress notes
- Abstract Syntax Trees
- Putting the 'packrat' into PEG: adding memoizing to my Ruby parser generator
- Updated packrat performance numbers
- Parser generator update
- Another performance update: parity
- Here documents
- Goodbye parity, hello superiority
- Payoff time