Class: Jekyll::Fragment

Inherits:
FragmentBlock show all
Defined in:
lib/jekyll-dry.rb

Instance Method Summary collapse

Methods inherited from FragmentBlock

#parse

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, options)
  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