module Shipyard::BoxHelper
Public Instance Methods
box(types=[], &block)
click to toggle source
# File lib/shipyard-framework/helpers/box_helper.rb, line 7 def box(types=[], &block) types = [*types] # Gather the appropriate box classes into an array. class_list = types.include?(:secondary) ? [] : ['box'] types.each do |type| class_list << "box-#{type}" end # Join the CSS Classes together. options ||= {} options[:class] = class_list.join(' ') # Return the HTML structure for the box. content_tag :div, capture(&block), options end