Liquid template implementation. See: liquid.rubyforge.org/
Liquid is designed to be a safe template system and threfore does not provide direct access to execuatable scopes. In order to support a scope, the scope must be able to represent itself as a hash by responding to #. If the scope does not respond to # it will be ignored.
LiquidTemplate does not support yield blocks.
It’s suggested that your program require ‘liquid’ at load time when using this template engine.
# File lib/sinatra/tilt.rb, line 590 590: def evaluate(scope, locals, &block) 591: locals = locals.inject({}){ |h,(k,v)| h[k.to_s] = v ; h } 592: if scope.respond_to?(:to_h) 593: scope = scope.to_h.inject({}){ |h,(k,v)| h[k.to_s] = v ; h } 594: locals = scope.merge(locals) 595: end 596: locals['yield'] = block.nil? ? '' : yield 597: locals['content'] = locals['yield'] 598: @engine.render(locals) 599: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.