Module Tilt::CompileSite
In: lib/sinatra/tilt.rb
Template BuilderTemplate LessTemplate RDiscountTemplate LiquidTemplate RDocTemplate MustacheTemplate StringTemplate RedClothTemplate HamlTemplate ERBTemplate CoffeeTemplate SassTemplate ErubisTemplate Cache lib/sinatra/tilt.rb CompileSite Tilt dot/m_4_0.png

Mixin allowing template compilation on scope objects.

Including this module in scope objects passed to Template#render causes template source to be compiled to methods the first time they‘re used. This can yield significant (5x-10x) performance increases for templates that support it (ERB, Erubis, Builder).

It‘s also possible (though not recommended) to include this module in Object to enable template compilation globally. The downside is that the template methods will polute the global namespace and could lead to unexpected behavior.

Methods

__tilt__  

Public Instance methods

[Source]

    # File lib/sinatra/tilt.rb, line 60
60:     def __tilt__
61:     end

[Validate]