class Jekyll::Tabs::TabsBlock

Public Class Methods

new(block_name, markup, tokens) click to toggle source
Calls superclass method
# File lib/jekyll-tabs.rb, line 7
def initialize(block_name, markup, tokens)
    super
    if markup == ''
        raise SyntaxError.new("Block #{block_name} requires 1 attribute")
    end
    @name = markup.strip
end

Public Instance Methods

render(context) click to toggle source
Calls superclass method
# File lib/jekyll-tabs.rb, line 15
def render(context)
    environment = context.environments.first
    super

    uuid = SecureRandom.uuid
    currentDirectory = File.dirname(__FILE__)
    templateFile = File.read(currentDirectory + '/template.erb')
    template = ERB.new(templateFile)
    template.result(binding)
end