Class: Coco::Rails::TemplateHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/coco/rails/template_handler.rb

Class Method Summary collapse

Class Method Details

.call(template) ⇒ Object



8
9
10
11
# File 'lib/coco/rails/template_handler.rb', line 8

def self.call(template)
  compiled_source = erb_handler.call(template)
  "Coco.compile(begin;#{compiled_source};end)"
end

.erb_handlerObject



4
5
6
# File 'lib/coco/rails/template_handler.rb', line 4

def self.erb_handler
  @@erb_handler ||= ActionView::Template.registered_template_handler(:erb)
end