Class Sprockets::EjsTemplate
In: lib/sprockets/ejs_template.rb
Parent: Tilt::Template

Tilt engine class for the EJS compiler. Depends on the `ejs` gem.

For more infomation see:

  https://github.com/sstephenson/ruby-ejs

Methods

Public Class methods

Check to see if EJS is loaded

Public Instance methods

Compile template data with EJS compiler.

Returns a JS function definition String. The result should be assigned to a JS variable.

    # => "function(obj){...}"

Autoload ejs library. If the library isn‘t loaded, Tilt will produce a thread safetly warning. If you intend to use `.ejs` files, you should explicitly require it.

[Validate]