class RablTemplate
Public Instance Methods
evaluate(context_scope, locals, &block)
click to toggle source
# File lib/rabl/template.rb, line 15 def evaluate(context_scope, locals, &block) # an inline template (Sinatra's __END__ section) starts at line, in its app's file options = @options.merge(:source_location => file, :source_line => line) ::Rabl::Engine.new(data, options).apply(context_scope, locals, &block).render end
initialize_engine()
click to toggle source
# File lib/rabl/template.rb, line 6 def initialize_engine return if defined?(::Rabl) require_template_library 'rabl' end
prepare()
click to toggle source
# File lib/rabl/template.rb, line 11 def prepare #left empty so each invocation has a new hash of options and new rabl engine for thread safety end