Class: Hypertemplate::Hook::Rails::Hypertemplate
- Inherits:
-
ActionView::TemplateHandler
- Object
- ActionView::TemplateHandler
- Hypertemplate::Hook::Rails::Hypertemplate
- Includes:
- ActionView::TemplateHandlers::Compilable
- Defined in:
- lib/hypertemplate/hook/rails.rb
Instance Method Summary collapse
Instance Method Details
#compile(template) ⇒ Object
37 38 39 40 41 42 43 44 |
# File 'lib/hypertemplate/hook/rails.rb', line 37 def compile(template) "@content_type_helpers = @controller.hypertemplate_registry[self.response.content_type].helper; " + "extend @content_type_helpers; " + "extend Hypertemplate::Hook::Rails::Helpers; " + "code_block = lambda { #{template.source} };" + "builder = code_block.call; " + "builder" end |