class Tilt::Template
def compiled_method(locals_keys, scope_class=nil)
directly on the scope class, which are much faster to call than
Returns an UnboundMethod, which can be used to define methods
The compiled method for the locals keys and scope_class provided.
def compiled_method(locals_keys, scope_class=nil) if @fixed_locals if @scope_class return @compiled_method else key = scope_class end elsif @scope_class key = locals_keys.dup.freeze else key = [scope_class, locals_keys].freeze end LOCK.synchronize do if meth = @compiled_method[key] return meth end end meth = compile_template_method(locals_keys, scope_class) LOCK.synchronize do @compiled_method[key] = meth end meth end