Class: Xlsxtream::Worksheet
- Inherits:
-
Object
- Object
- Xlsxtream::Worksheet
- Defined in:
- lib/xlsxtream/worksheet.rb
Instance Method Summary collapse
- #<<(row) ⇒ Object (also: #add_row)
- #close ⇒ Object
-
#initialize(io, options = {}) ⇒ Worksheet
constructor
A new instance of Worksheet.
Constructor Details
#initialize(io, options = {}) ⇒ Worksheet
Returns a new instance of Worksheet.
7 8 9 10 11 12 13 |
# File 'lib/xlsxtream/worksheet.rb', line 7 def initialize(io, = {}) @io = io @rownum = 1 = write_header end |
Instance Method Details
#<<(row) ⇒ Object Also known as: add_row
15 16 17 18 |
# File 'lib/xlsxtream/worksheet.rb', line 15 def <<(row) @io << Row.new(row, @rownum, ).to_xml @rownum += 1 end |
#close ⇒ Object
21 22 23 |
# File 'lib/xlsxtream/worksheet.rb', line 21 def close end |