Class: Template::Handlers::MamboTemplateHandler
- Inherits:
-
Template::Handler
- Object
- Template::Handler
- Template::Handlers::MamboTemplateHandler
- Includes:
- Compilable
- Defined in:
- lib/mambo/mambo_template_handler.rb,
lib/mambo/mambo_template_handler.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(template) ⇒ Object
35 36 37 38 39 |
# File 'lib/mambo/mambo_template_handler.rb', line 35 def self.call(template) "json = ::Mambo::Mambo.new;" + template.source + ";json.to_json;" end |
Instance Method Details
#compile(template) ⇒ Object
11 12 13 |
# File 'lib/mambo/mambo_template_handler.rb', line 11 def compile(template) "update_page do |page|;#{template.source}\nend" end |
#default_format ⇒ Object
15 16 17 |
# File 'lib/mambo/mambo_template_handler.rb', line 15 def default_format Mime::JSON end |