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