Class: Xlsxrb::StreamSheet
- Inherits:
-
Object
- Object
- Xlsxrb::StreamSheet
- Defined in:
- lib/xlsxrb.rb,
sig/generated/xlsxrb.rbs
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 {|arg0| ... } ⇒ void
: () { (Elements::Row) -> void } -> void : | () -> Enumerator[Elements::Row, void].
-
#each_row {|arg0| ... } ⇒ void
: () { (Elements::Row) -> void } -> void : | () -> Enumerator[Elements::Row, void].
-
#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.
485 486 487 488 489 |
# File 'lib/xlsxrb.rb', line 485 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.
483 484 485 |
# File 'lib/xlsxrb.rb', line 483 def name @name end |
Instance Method Details
#each {|arg0| ... } ⇒ void
This method returns an undefined value.
: () { (Elements::Row) -> void } -> void : | () -> Enumerator[Elements::Row, void]
507 508 509 |
# File 'lib/xlsxrb.rb', line 507 def each(&) each_row(&) end |
#each_row {|arg0| ... } ⇒ void
This method returns an undefined value.
: () { (Elements::Row) -> void } -> void : | () -> Enumerator[Elements::Row, void]
493 494 495 496 497 498 499 500 501 502 503 |
# File 'lib/xlsxrb.rb', line 493 def each_row return enum_for(:each_row) unless block_given? Ooxml::WorksheetParser.each_row(@sheet_xml, shared_strings: @shared_strings) do |row| if row.is_a?(Elements::Row) yield row else yield Xlsxrb.send(:build_row_from_raw, row) end end end |