Method: Pith::Input#render
- Defined in:
- lib/pith/input.rb
#render(context, locals = {}, &block) ⇒ Object
Render this input using Tilt
61 62 63 64 65 66 67 68 |
# File 'lib/pith/input.rb', line 61 def render(context, locals = {}, &block) return file.read if !template? ensure_loaded @pipeline.inject(@template_text) do |text, processor| template = processor.new(file.to_s, @template_start_line) { text } template.render(context, locals, &block) end end |