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. 
- 
  
    
      #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
- 
  
    
      #initialize(dir)  ⇒ Shared 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Shared. 
- #shared_strings ⇒ Object
- #styles ⇒ Object
- #workbook ⇒ Object
Constructor Details
#initialize(dir) ⇒ Shared
Returns a new instance of Shared.
| 8 9 10 11 12 13 | # File 'lib/roo/excelx/shared.rb', line 8 def initialize(dir) @dir = dir @comments_files = [] @sheet_files = [] @rels_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 | 
#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
| 27 28 29 | # File 'lib/roo/excelx/shared.rb', line 27 def base_date workbook.base_date end | 
#shared_strings ⇒ Object
| 19 20 21 | # File 'lib/roo/excelx/shared.rb', line 19 def shared_strings @shared_strings ||= SharedStrings.new(File.join(@dir, 'roo_sharedStrings.xml')) end | 
#styles ⇒ Object
| 15 16 17 | # File 'lib/roo/excelx/shared.rb', line 15 def styles @styles ||= Styles.new(File.join(@dir, 'roo_styles.xml')) end | 
#workbook ⇒ Object
| 23 24 25 | # File 'lib/roo/excelx/shared.rb', line 23 def workbook @workbook ||= Workbook.new(File.join(@dir, 'roo_workbook.xml')) end |