Class: ActionView::Template::Handlers::Bldr
- Inherits:
-
Object
- Object
- ActionView::Template::Handlers::Bldr
- Defined in:
- lib/action_view/template/handlers/bldr.rb
Class Method Summary collapse
-
.call(template, opts = {}) ⇒ String
The rendered ruby code string to render the template.
Class Method Details
.call(template, opts = {}) ⇒ String
Returns the rendered ruby code string to render the template.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/action_view/template/handlers/bldr.rb', line 6 def self.call(template, opts = {}) source = if template.source.empty? File.read(template.identifier) else template.source end %{ node = ::Bldr::Node.new(nil, parent: self, root: true) { #{source} } MultiJson.encode node.result } end |