class Jekyll::Tabs::TabBlock
Public Class Methods
new(block_name, markup, tokens)
click to toggle source
Calls superclass method
# File lib/jekyll-tabs.rb, line 30 def initialize(block_name, markup, tokens) super markups = markup.split(' ', 2) if markups.length != 2 raise SyntaxError.new("Block #{block_name} requires 2 attributes") end @name = markups[0] @tab = markups[1] end
Public Instance Methods
render(context)
click to toggle source
# File lib/jekyll-tabs.rb, line 40 def render(context) site = context.registers[:site] converter = site.find_converter_instance(::Jekyll::Converters::Markdown) environment = context.environments.first environment["tabs-#{@name}"] ||= {} environment["tabs-#{@name}"][@tab] = converter.convert(render_block(context)) end
Also aliased as: render_block