Class: Tablette::Section

Inherits:
Element show all
Defined in:
lib/tablette/sections.rb

Direct Known Subclasses

Body, Footer, Header

Instance Attribute Summary

Attributes inherited from Element

#helper, #renderer

Instance Method Summary collapse

Methods inherited from Element

#element_to_html, #initialize, #method_missing, #respond_to_missing?, #to_html

Constructor Details

This class inherits a constructor from Tablette::Element

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Tablette::Element

Instance Method Details

#columns_for_section(args) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/tablette/sections.rb', line 5

def columns_for_section(args)
  columns = 0

  self.row.each do |row|
    row_columns = row.columns_for_row args
    columns = row_columns if row_columns > columns
  end

  columns
end

#update_auto_colspan!(columns, args) ⇒ Object



16
17
18
19
20
# File 'lib/tablette/sections.rb', line 16

def update_auto_colspan!(columns, args)
  self.row.each do |row|
    row.update_auto_colspan! columns, args
  end
end