Class: ExcelAbstraction::Row
- Inherits:
-
Object
- Object
- ExcelAbstraction::Row
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/excel_templating/excel_abstraction/row.rb
Instance Attribute Summary collapse
-
#cells ⇒ Object
protected
Returns the value of attribute cells.
-
#styles ⇒ Object
Returns the value of attribute styles.
Instance Method Summary collapse
- #<<(attrs) ⇒ Object
- #[](index) ⇒ Object
-
#initialize ⇒ Row
constructor
A new instance of Row.
Constructor Details
#initialize ⇒ Row
Returns a new instance of Row.
12 13 14 15 |
# File 'lib/excel_templating/excel_abstraction/row.rb', line 12 def initialize @cells = [] @styles = {} end |
Instance Attribute Details
#cells ⇒ Object (protected)
Returns the value of attribute cells.
27 28 29 |
# File 'lib/excel_templating/excel_abstraction/row.rb', line 27 def cells @cells end |
#styles ⇒ Object
Returns the value of attribute styles.
6 7 8 |
# File 'lib/excel_templating/excel_abstraction/row.rb', line 6 def styles @styles end |
Instance Method Details
#<<(attrs) ⇒ Object
21 22 23 |
# File 'lib/excel_templating/excel_abstraction/row.rb', line 21 def <<(attrs) @cells << ExcelAbstraction::Cell.new(attrs) end |
#[](index) ⇒ Object
17 18 19 |
# File 'lib/excel_templating/excel_abstraction/row.rb', line 17 def [](index) find { |cell| cell.position == index } end |