lib/tilt.rb
# Process the template and return the result. The first time this
# method is called, the template source is evaluated with instance_eval.
# On the sequential method calls it will compile the template to an
# unbound method which will lead to better performance. In any case,
# template executation is guaranteed to be performed in the scope object
# with the locals specified and with support for yielding to the block.
Process the template and return the result. The first time this
method is called, the template source is evaluated with instance_eval.
On the sequential method calls it will compile the template to an
unbound method which will lead to better performance. In any case,
template executation is guaranteed to be performed in the scope object
with the locals specified and with support for yielding to the block.
Process the template and return the result . The first time this method is called the template source is evaluated with instance_eval . On the sequential method calls it will compile the template to an unbound method which will lead to better performance . In any case template executation is guaranteed to be performed in the scope object with the locals specified and with support for yielding to the block .
def evaluate(scope, locals, &block)
      def self.evaluate(scope, locals, &block)
        method = compiled_method(locals.keys)
        method.bind(scope).call(locals, &block)
      end
      evaluate_source(scope, locals, &block)
    end
def evaluate ( scope , locals , & block ) def self . evaluate ( scope , locals , & block ) method = compiled_method ( locals . keys ) method . bind ( scope ) . call ( locals , & block ) end evaluate_source ( scope , locals , & block ) end
Process the template and return the result.
Process the template and return the result .
# Redefine itself to use method compilation the next time: # Use instance_eval the first time:
scope
<not_specific>
locals
<not_specific>
block
<not_specific>