Class: Jekyll::Diagrams::GraphvizBlock
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Jekyll::Diagrams::GraphvizBlock
- Defined in:
- lib/jekyll/diagrams/graphviz.rb
Instance Method Summary collapse
-
#initialize(tag_name, text, tokens) ⇒ GraphvizBlock
constructor
A new instance of GraphvizBlock.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, text, tokens) ⇒ GraphvizBlock
Returns a new instance of GraphvizBlock.
6 7 8 9 10 |
# File 'lib/jekyll/diagrams/graphviz.rb', line 6 def initialize(tag_name, text, tokens) super @tag_name = tag_name @engine = text.strip end |
Instance Method Details
#render(context) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/jekyll/diagrams/graphviz.rb', line 12 def render(context) config = context.registers[:site].config["diagrams"] @renderer = GraphvizRenderer.new(config["graphviz"]) render_diagram(super) end |