Class: Jekyll::Bulma::Tabs::TabsBlock
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Jekyll::Bulma::Tabs::TabsBlock
- Defined in:
- lib/jekyll/bulma/tabs.rb
Instance Method Summary collapse
-
#initialize(tag_name, markup, options) ⇒ TabsBlock
constructor
A new instance of TabsBlock.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, markup, options) ⇒ TabsBlock
Returns a new instance of TabsBlock.
11 12 13 14 15 16 17 18 19 |
# File 'lib/jekyll/bulma/tabs.rb', line 11 def initialize(tag_name, markup, ) super markups = markup.split(' ', 2) if markups.length == 0 raise SyntaxError.new("Block #{tag_name} requires 1 attribute") end @tabs_group = markups[0] @tabs_opts = markups[1] end |
Instance Method Details
#render(context) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/jekyll/bulma/tabs.rb', line 21 def render(context) super environment = context.environments.first currentDirectory = File.dirname(__FILE__) templateFile = File.read(currentDirectory + '/template.erb') template = ERB.new(templateFile) template.result(binding) end |