Method: Blot::Helpers::Grid#columns

Defined in:
lib/blot/helpers/grid.rb

#columns(width, options = {}) ⇒ Object Also known as: column



41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/blot/helpers/grid.rb', line 41

def columns(width, options={})
   :table, class: "#{width} columns" do
     :tr do
      content = if options[:sub_columns]
        block_given? ? yield : nil
      elsif !options.empty? || block_given?
         :td, options do
          optional_content(options) { yield if block_given? }
        end
      else
        nil
      end

      [content, expander].join('').html_safe
    end
  end
end