Class: Shipyard::Jekyll::Box

Inherits:
Liquid::Block
  • Object
show all
Includes:
BoxHelper
Defined in:
lib/shipyard-framework/jekyll/tags/box_tag.rb

Instance Method Summary collapse

Methods included from BoxHelper

#box

Constructor Details

#initialize(tag_name, types, options) ⇒ Box

Returns a new instance of Box.



8
9
10
11
12
13
14
# File 'lib/shipyard-framework/jekyll/tags/box_tag.rb', line 8

def initialize(tag_name, types, options)
  super
  @types = []
  types.tr(' ','').split(',').each do |type|
    @types << type.tr(':','').tr('_','-').to_sym
  end
end

Instance Method Details

#render(context) ⇒ Object



16
17
18
# File 'lib/shipyard-framework/jekyll/tags/box_tag.rb', line 16

def render(context)
  box(@types) { raw(super.strip) }
end