Class: Jekyll::Fragment
- Inherits:
-
FragmentBlock
- Object
- Liquid::Block
- FragmentBlock
- Jekyll::Fragment
- Defined in:
- lib/jekyll-dry.rb
Instance Method Summary collapse
-
#initialize(tag_name, markup, options) ⇒ Fragment
constructor
A new instance of Fragment.
- #render(context) ⇒ Object
Methods inherited from FragmentBlock
Constructor Details
#initialize(tag_name, markup, options) ⇒ Fragment
Returns a new instance of Fragment.
102 103 104 105 |
# File 'lib/jekyll-dry.rb', line 102 def initialize(tag_name, markup, ) super @fragment_id, _ = markup.strip.split(%r!\s+!, 2) end |
Instance Method Details
#render(context) ⇒ Object
107 108 109 110 111 112 |
# File 'lib/jekyll-dry.rb', line 107 def render(context) output = super #context[@fragment_id] = output #context.resource_limits.assign_score += output.length output end |