Class: SimpleXlsx::Document
- Inherits:
-
Object
- Object
- SimpleXlsx::Document
- Defined in:
- lib/simple_xlsx/document.rb
Instance Attribute Summary collapse
-
#sheets ⇒ Object
readonly
Returns the value of attribute sheets.
Instance Method Summary collapse
- #add_sheet(name, &block) ⇒ Object
- #has_shared_strings? ⇒ Boolean
-
#initialize(io) ⇒ Document
constructor
A new instance of Document.
Constructor Details
#initialize(io) ⇒ Document
Returns a new instance of Document.
3 4 5 6 |
# File 'lib/simple_xlsx/document.rb', line 3 def initialize(io) @sheets = [] @io = io end |
Instance Attribute Details
#sheets ⇒ Object (readonly)
Returns the value of attribute sheets.
8 9 10 |
# File 'lib/simple_xlsx/document.rb', line 8 def sheets @sheets end |
Instance Method Details
#add_sheet(name, &block) ⇒ Object
10 11 12 13 |
# File 'lib/simple_xlsx/document.rb', line 10 def add_sheet name, &block stream = @io.open_stream_for_sheet(@sheets.size) @sheets << Sheet.new(self, name, stream, &block) end |
#has_shared_strings? ⇒ Boolean
15 16 17 |
# File 'lib/simple_xlsx/document.rb', line 15 def has_shared_strings? false end |