Class: Jekyll::LiquidRenderer::File
- Inherits:
-
Object
- Object
- Jekyll::LiquidRenderer::File
- Defined in:
- lib/jekyll/liquid_renderer/file.rb
Instance Method Summary collapse
-
#initialize(renderer, filename) ⇒ File
constructor
A new instance of File.
- #parse(content) ⇒ Object
- #render(*args) ⇒ Object
- #render!(*args) ⇒ Object
Constructor Details
#initialize(renderer, filename) ⇒ File
Returns a new instance of File.
4 5 6 7 |
# File 'lib/jekyll/liquid_renderer/file.rb', line 4 def initialize(renderer, filename) @renderer = renderer @filename = filename end |
Instance Method Details
#parse(content) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/jekyll/liquid_renderer/file.rb', line 9 def parse(content) measure_time do @template = Liquid::Template.parse(content) end self end |
#render(*args) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/jekyll/liquid_renderer/file.rb', line 17 def render(*args) measure_time do measure_bytes do @template.render(*args) end end end |
#render!(*args) ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/jekyll/liquid_renderer/file.rb', line 25 def render!(*args) measure_time do measure_bytes do @template.render!(*args) end end end |