Class: Template::Handlers::ArgonautBuilder
- Inherits:
-
Template::Handler
- Object
- Template::Handler
- Template::Handlers::ArgonautBuilder
- Includes:
- Compilable
- Defined in:
- lib/argonaut/template.rb
Instance Method Summary collapse
Instance Method Details
#compile(template) ⇒ Object
11 12 13 14 15 |
# File 'lib/argonaut/template.rb', line 11 def compile(template) "doc = ::Argonaut::Generator.new do |json|" + template.source + "end;doc.to_json;" end |