Class: Xlsxrb::StreamSheet
Overview
Represents a sheet being streamed sequentially.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #each_row ⇒ Object (also: #each)
-
#initialize(name, sheet_xml, shared_strings) ⇒ StreamSheet
constructor
A new instance of StreamSheet.
Constructor Details
#initialize(name, sheet_xml, shared_strings) ⇒ StreamSheet
Returns a new instance of StreamSheet.
432 433 434 435 436 |
# File 'lib/xlsxrb.rb', line 432 def initialize(name, sheet_xml, shared_strings) @name = name @sheet_xml = sheet_xml @shared_strings = shared_strings end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
430 431 432 |
# File 'lib/xlsxrb.rb', line 430 def name @name end |
Instance Method Details
#each_row ⇒ Object Also known as: each
438 439 440 441 442 443 444 |
# File 'lib/xlsxrb.rb', line 438 def each_row return enum_for(:each_row) unless block_given? Ooxml::WorksheetParser.each_row(@sheet_xml, shared_strings: @shared_strings) do |raw_row| yield Xlsxrb.send(:build_row_from_raw, raw_row) end end |