Class: Jekyll::ConvertifyIncludeTag
- Inherits:
-
Tags::IncludeTag
- Object
- Tags::IncludeTag
- Jekyll::ConvertifyIncludeTag
- Defined in:
- lib/jekyll-convertify/tags.rb
Instance Method Summary collapse
-
#initialize(tag_name, markup, tokens) ⇒ ConvertifyIncludeTag
constructor
A new instance of ConvertifyIncludeTag.
- #locate_include_file(context, file, safe) ⇒ Object
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, markup, tokens) ⇒ ConvertifyIncludeTag
Returns a new instance of ConvertifyIncludeTag.
29 30 31 32 |
# File 'lib/jekyll-convertify/tags.rb', line 29 def initialize(tag_name, markup, tokens) markup, @dst_ext = Convertify::TagHelper::split_include_markup(markup) super tag_name, markup, tokens end |
Instance Method Details
#locate_include_file(context, file, safe) ⇒ Object
34 35 36 37 |
# File 'lib/jekyll-convertify/tags.rb', line 34 def locate_include_file(context, file, safe) @src_ext = Convertify::ConvertHelper::infer_extension(file) super end |
#render(context) ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/jekyll-convertify/tags.rb', line 39 def render(context) context.stack do context["convertify_extension"] = @dst_ext input = super Convertify.convert(context, lambda { input }, @src_ext, @dst_ext) end end |