Class: Shipyard::Jekyll::Box
- Inherits:
-
Liquid::Block
- Object
- Liquid::Block
- Shipyard::Jekyll::Box
- Includes:
- BoxHelper
- Defined in:
- lib/shipyard-framework/jekyll/tags/box_tag.rb
Instance Method Summary collapse
-
#initialize(tag_name, types, options) ⇒ Box
constructor
A new instance of Box.
- #render(context) ⇒ Object
Methods included from BoxHelper
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, ) 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 |