Class: Tableasy::Table::Row
- Inherits:
-
Object
- Object
- Tableasy::Table::Row
- Includes:
- HtmlAttributes
- Defined in:
- lib/tableasy/table/row.rb
Instance Attribute Summary collapse
-
#cells ⇒ Object
readonly
Returns the value of attribute cells.
Instance Method Summary collapse
- #header_row? ⇒ Boolean
-
#initialize(cells, html = {}) ⇒ Row
constructor
A new instance of Row.
- #total_row? ⇒ Boolean
Methods included from HtmlAttributes
Constructor Details
#initialize(cells, html = {}) ⇒ Row
Returns a new instance of Row.
7 8 9 10 11 |
# File 'lib/tableasy/table/row.rb', line 7 def initialize(cells, html = {}) @cells = cells.select {|cell| cell.value } @total, @header = html.delete(:total), html.delete(:header) @html = html end |
Instance Attribute Details
#cells ⇒ Object (readonly)
Returns the value of attribute cells.
5 6 7 |
# File 'lib/tableasy/table/row.rb', line 5 def cells @cells end |
Instance Method Details
#header_row? ⇒ Boolean
17 18 19 |
# File 'lib/tableasy/table/row.rb', line 17 def header_row? @header end |
#total_row? ⇒ Boolean
13 14 15 |
# File 'lib/tableasy/table/row.rb', line 13 def total_row? @total end |