Class: ActionView::TemplateHandler
- Defined in:
- lib/action_view/template_handler.rb
Direct Known Subclasses
ActionView::TemplateHandlers::Builder, ActionView::TemplateHandlers::ERB, ActionView::TemplateHandlers::RJS
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(view = nil) ⇒ TemplateHandler
constructor
A new instance of TemplateHandler.
- #render(template, local_assigns) ⇒ Object
Constructor Details
#initialize(view = nil) ⇒ TemplateHandler
Returns a new instance of TemplateHandler.
26 27 28 |
# File 'lib/action_view/template_handler.rb', line 26 def initialize(view = nil) @view = view end |
Class Method Details
.call(template) ⇒ Object
22 23 24 |
# File 'lib/action_view/template_handler.rb', line 22 def self.call(template) "#{name}.new(self).render(template, local_assigns)" end |
Instance Method Details
#render(template, local_assigns) ⇒ Object
30 31 32 |
# File 'lib/action_view/template_handler.rb', line 30 def render(template, local_assigns) raise "Need to implement #{self.class.name}#render(template, local_assigns)" end |