Class: Roo::Excelx::Shared
- Inherits:
-
Object
- Object
- Roo::Excelx::Shared
- Defined in:
- lib/roo/excelx/shared.rb
Overview
Public: Shared class for allowing sheets to share data. This should
reduce memory usage and reduce the number of objects being passed
to various inititializers.
Instance Attribute Summary collapse
-
#comments_files ⇒ Object
Returns the value of attribute comments_files.
-
#image_files ⇒ Object
Returns the value of attribute image_files.
-
#image_rels ⇒ Object
Returns the value of attribute image_rels.
-
#rels_files ⇒ Object
Returns the value of attribute rels_files.
-
#sheet_files ⇒ Object
Returns the value of attribute sheet_files.
Instance Method Summary collapse
- #base_date ⇒ Object
- #base_timestamp ⇒ Object
-
#initialize(dir, options = {}) ⇒ Shared
constructor
A new instance of Shared.
- #shared_strings ⇒ Object
- #styles ⇒ Object
- #workbook ⇒ Object
Constructor Details
#initialize(dir, options = {}) ⇒ Shared
Returns a new instance of Shared.
8 9 10 11 12 13 14 15 16 |
# File 'lib/roo/excelx/shared.rb', line 8 def initialize(dir, = {}) @dir = dir @comments_files = [] @sheet_files = [] @rels_files = [] @options = @image_rels = [] @image_files = [] end |
Instance Attribute Details
#comments_files ⇒ Object
Returns the value of attribute comments_files.
7 8 9 |
# File 'lib/roo/excelx/shared.rb', line 7 def comments_files @comments_files end |
#image_files ⇒ Object
Returns the value of attribute image_files.
7 8 9 |
# File 'lib/roo/excelx/shared.rb', line 7 def image_files @image_files end |
#image_rels ⇒ Object
Returns the value of attribute image_rels.
7 8 9 |
# File 'lib/roo/excelx/shared.rb', line 7 def image_rels @image_rels end |
#rels_files ⇒ Object
Returns the value of attribute rels_files.
7 8 9 |
# File 'lib/roo/excelx/shared.rb', line 7 def rels_files @rels_files end |
#sheet_files ⇒ Object
Returns the value of attribute sheet_files.
7 8 9 |
# File 'lib/roo/excelx/shared.rb', line 7 def sheet_files @sheet_files end |
Instance Method Details
#base_date ⇒ Object
30 31 32 |
# File 'lib/roo/excelx/shared.rb', line 30 def base_date workbook.base_date end |
#base_timestamp ⇒ Object
34 35 36 |
# File 'lib/roo/excelx/shared.rb', line 34 def workbook. end |
#shared_strings ⇒ Object
22 23 24 |
# File 'lib/roo/excelx/shared.rb', line 22 def shared_strings @shared_strings ||= SharedStrings.new(File.join(@dir, 'roo_sharedStrings.xml'), @options) end |