Module: Shipyard::BoxHelper
- Includes:
- ActionView::Context, ActionView::Helpers::TagHelper, ActionView::Helpers::TextHelper
- Included in:
- Jekyll::Box
- Defined in:
- app/helpers/shipyard/box_helper.rb
Instance Method Summary collapse
Instance Method Details
#box(types, content) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/shipyard/box_helper.rb', line 7 def box(types, content) # Gather the appropriate box classes into an array. class_list = ['box'] types.each do |type| class_list << "box-#{type}" end # Join the CSS Classes together. ||= {} [:class] = class_list.join(' ') # Return the HTML structure for the box. content_tag :div, content, end |