Class: Minimal::Template::Handler

Inherits:
ActionView::Template::Handler
  • Object
show all
Includes:
ActionView::Template::Handlers::Compilable
Defined in:
lib/minimal/template/handler.rb

Instance Method Summary collapse

Instance Method Details

#compile(template) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/minimal/template/handler.rb', line 5

def compile(template)
  <<-code
    @output_buffer = ActiveSupport::SafeBuffer.new
    require_dependency "#{template.identifier}"
    #{template_class_name(template.identifier)}.new(self)._render(local_assigns)
  code
end