Class: Jsonit::Rails::TemplateHandler

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

Class Method Summary collapse

Class Method Details

.call(template) ⇒ Object



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

def call(template)
  "::Jsonit::Builder.new do |json|" +
  template.source +
  "end.to_json"
end