Class: ActionView::Pathfinder::Template
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ActionView::Pathfinder::Template
- Defined in:
- lib/actionview/pathfinder/template.rb
Instance Method Summary collapse
-
#initialize(template) ⇒ Template
constructor
A new instance of Template.
-
#render(view, locals, buffer = nil, &block) ⇒ Object
adds an html comment at the beginning and end of each template, when rendering, that contains the path to that view file.
Constructor Details
#initialize(template) ⇒ Template
Returns a new instance of Template.
5 6 7 8 |
# File 'lib/actionview/pathfinder/template.rb', line 5 def initialize(template) super @template = template end |
Instance Method Details
#render(view, locals, buffer = nil, &block) ⇒ Object
adds an html comment at the beginning and end of each template, when rendering, that contains the path to that view file.
13 14 15 16 17 |
# File 'lib/actionview/pathfinder/template.rb', line 13 def render(view, locals, buffer=nil, &block) @template.instance_variable_set(:'@source', wrapped_source) super(view, locals, buffer, &block) end |