Class: VersatileRJS::TemplateHandler

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(template) ⇒ Object



3
4
5
# File 'lib/versatile_rjs/template_handler.rb', line 3

def self.call(template)
  new.call(template)
end

Instance Method Details

#call(template) ⇒ Object



7
8
9
# File 'lib/versatile_rjs/template_handler.rb', line 7

def call(template)
  "VersatileRJS::Page.new(self).evaluate{|page|#{template.source}}.to_script(true)"
end