I need ERB (Ruby\'s templating system) for templating of non-HTML files. (Instead, I want to use it for source files such as .java, .cs, ...)>
Write a ruby script that does it. The API documentation is here: http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/
For example:
template = ERB.new File.read("path/to/template.erb"), nil, "%" template.result(binding)
(Where binding is a binding with the @vars that the template needs.)