def render_proc(scope = Object.new, *local_names)
      if scope.is_a?(Binding)
        scope_object = eval("self", scope)
      else
        scope_object = scope
        scope = scope_object.instance_eval{binding}
      end

      begin
        str = @temple_engine.precompiled_with_ambles(local_names)
        eval(
          "Proc.new { |*_haml_locals| _haml_locals = _haml_locals[0] || {}; #{str}}\n",
          scope,
          @options.filename,
          @options.line
        )
      rescue ::SyntaxError => e
        raise SyntaxError, e.message
      end
    end
def render_proc(scope = Object.new, *local_names)
      if scope.is_a?(Binding)
        scope_object = eval("self", scope)
      else
        scope_object = scope
        scope = scope_object.instance_eval{binding}
      end

      begin
        str = @temple_engine.precompiled_with_ambles(local_names)
        eval(
          "Proc.new { |*_haml_locals| _haml_locals = _haml_locals[0] || {}; #{str}}\n",
          scope,
          @options.filename,
          @options.line
        )
      rescue ::SyntaxError => e
        raise SyntaxError, e.message
      end
    end
Returns a proc that, when called,
 renders the template and returns the result as a string.

 `scope` works the same as it does for render.

 The first argument of the returned proc is a hash of local variable names to values.
 However, due to an unfortunate Ruby quirk,
 the local variables which can be assigned must be pre-declared.
 This is done with the `local_names` argument.
 For example:

     # This works
     Haml::Engine.new("%p= foo").render_proc(Object.new, :foo).call :foo => "Hello!"
       #=> "<p>Hello!</p>"

     # This doesn't
     Haml::Engine.new("%p= foo").render_proc.call :foo => "Hello!"
       #=> NameError: undefined local variable or method `foo'

 The proc doesn't take a block; any yields in the template will fail.

 @param scope [Binding, Object] The context in which the template is evaluated
 @param local_names [Array<Symbol>] The names of the locals that can be passed to the proc
 @return [Proc] The proc that will run the template