Class: TotallyTabular::Column
Instance Attribute Summary collapse
-
#cell_attributes ⇒ Object
Returns the value of attribute cell_attributes.
-
#definition ⇒ Object
Returns the value of attribute definition.
-
#header_attributes ⇒ Object
Returns the value of attribute header_attributes.
-
#name ⇒ Object
Returns the value of attribute name.
-
#row_attributes ⇒ Object
Returns the value of attribute row_attributes.
-
#template ⇒ Object
Returns the value of attribute template.
Instance Method Summary collapse
- #cell_attributes!(attributes = {}) ⇒ Object
- #header_attributes!(attributes = {}) ⇒ Object
-
#initialize(name, &block) ⇒ Column
constructor
A new instance of Column.
- #row_attributes!(attributes = {}) ⇒ Object
- #template!(&block) ⇒ Object
Constructor Details
#initialize(name, &block) ⇒ Column
Returns a new instance of Column.
5 6 7 8 9 10 11 |
# File 'lib/totally_tabular/column.rb', line 5 def initialize(name, &block) @name = name @header_attributes = {} @row_attributes = {} @cell_attributes = {} @definition = block end |
Instance Attribute Details
#cell_attributes ⇒ Object
Returns the value of attribute cell_attributes.
3 4 5 |
# File 'lib/totally_tabular/column.rb', line 3 def cell_attributes @cell_attributes end |
#definition ⇒ Object
Returns the value of attribute definition.
3 4 5 |
# File 'lib/totally_tabular/column.rb', line 3 def definition @definition end |
#header_attributes ⇒ Object
Returns the value of attribute header_attributes.
3 4 5 |
# File 'lib/totally_tabular/column.rb', line 3 def header_attributes @header_attributes end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/totally_tabular/column.rb', line 3 def name @name end |
#row_attributes ⇒ Object
Returns the value of attribute row_attributes.
3 4 5 |
# File 'lib/totally_tabular/column.rb', line 3 def row_attributes @row_attributes end |
#template ⇒ Object
Returns the value of attribute template.
3 4 5 |
# File 'lib/totally_tabular/column.rb', line 3 def template @template end |
Instance Method Details
#cell_attributes!(attributes = {}) ⇒ Object
25 26 27 |
# File 'lib/totally_tabular/column.rb', line 25 def cell_attributes!(attributes={}) @cell_attributes = attributes end |
#header_attributes!(attributes = {}) ⇒ Object
17 18 19 |
# File 'lib/totally_tabular/column.rb', line 17 def header_attributes!(attributes={}) @header_attributes = attributes end |
#row_attributes!(attributes = {}) ⇒ Object
21 22 23 |
# File 'lib/totally_tabular/column.rb', line 21 def row_attributes!(attributes={}) @row_attributes = attributes end |
#template!(&block) ⇒ Object
13 14 15 |
# File 'lib/totally_tabular/column.rb', line 13 def template!(&block) @template = block end |