Class: Jekyll::KrokiTag::Block
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Jekyll::KrokiTag::Block
- Includes:
- Util, Liquid::StandardFilters
- Defined in:
- lib/jekyll/kroki_tag.rb
Class Method Summary collapse
-
.register(site) ⇒ Object
if you want to customize, read from ‘site.config`.
Instance Method Summary collapse
-
#initialize(tag_name, text, tokens) ⇒ Block
constructor
A new instance of Block.
- #render(context) ⇒ string
Methods included from Util
#encode_diagram, #esc, #parse_args, #render_body, #uri
Constructor Details
#initialize(tag_name, text, tokens) ⇒ Block
91 92 93 94 95 |
# File 'lib/jekyll/kroki_tag.rb', line 91 def initialize(tag_name, text, tokens) super @opts = parse_args(text) end |
Class Method Details
.register(site) ⇒ Object
if you want to customize, read from ‘site.config`
81 82 83 |
# File 'lib/jekyll/kroki_tag.rb', line 81 def register(site) Liquid::Template.register_tag("kroki", self) end |
Instance Method Details
#render(context) ⇒ string
101 102 103 104 105 |
# File 'lib/jekyll/kroki_tag.rb', line 101 def render(context) inner_text = super render_body(inner_text, opts: @opts) end |