class Jekyll::Simple::Tab::TabsBlock

Public Class Methods

new(tag, args, _) click to toggle source
Calls superclass method
# File lib/jekyll-simple-tab.rb, line 9
def initialize(tag, args, _)
  super

  raise SyntaxError.new("#{tag} requires name") if args.empty?

  @tab_name = args.strip
end

Public Instance Methods

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

  templateFilePath = template_path(DEFAULT_TEMPLATE)
  template = Slim::Template.new(templateFilePath)
  template.render(self)
end
template_path(template_name) click to toggle source
# File lib/jekyll-simple-tab.rb, line 17
def template_path(template_name)
  dir = File.dirname(__FILE__)
  File.join(dir, template_name.to_s)
end