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
12
13
# File 'lib/minimal/template/handler.rb', line 5

def compile(template)
  require_dependency template.identifier
  class_name, format = template_class_name_and_format(template.identifier)
  "    @output_buffer = ActiveSupport::SafeBuffer.new\n    template, format = ::\#{class_name}, \#{format.inspect}\n    template.new(self)._render(local_assigns, format) { |*args| yield(*args) }\n  code\nend\n"