Module: Keynote::Inline::InstanceMethods

Defined in:
lib/keynote/inline.rb

Instance Method Summary collapse

Instance Method Details

#_run(method, template, locals, buffer, add_to_stack: true, has_strict_locals: false, &block) ⇒ Object



109
110
111
112
113
114
115
116
# File 'lib/keynote/inline.rb', line 109

def _run(method, template, locals, buffer, add_to_stack: true, has_strict_locals: false, &block)
  old_output_buffer, old_virtual_path, old_template = @output_buffer, @virtual_path, @current_template
  @current_template = template if add_to_stack
  @output_buffer = buffer
  public_send(method, locals, buffer, &block)
ensure
  @output_buffer, @virtual_path, @current_template = old_output_buffer, old_virtual_path, old_template
end