Sha256: 4d7ea86a052a825ef9472318cd11a153f171088dad2a37ef48de3ec1aed4b540

Contents?: true

Size: 874 Bytes

Versions: 9

Compression:

Stored size: 874 Bytes

Contents

require_relative 'shared_formula_builder'

module RubyFromExcel
  class SharedFormulaCell < FormulaCell
    attr_accessor :shared_formula
    attr_accessor :shared_formula_offset
    
    def parse_formula
      # No
    end
  
    def work_out_dependencies
      self.dependencies ||= shared_formula.visit(SharedFormulaDependencyBuilder.new(self,shared_formula_offset))
    end
  
    def ruby_value
      "@#{reference.to_ruby} ||= #{shared_formula.visit(SharedFormulaBuilder.new(self, shared_formula_offset))}"
    end
    
    def debug
      # Await the sharing formula
    end
    
    def debug_after_sharing
      RubyFromExcel.debug(:cells,"#{worksheet.name}.#{reference} -> shared -> #{original_formula.inspect} -> #{shared_formula.inspect} offset #{shared_formula_offset.inspect} -> #{xml_value} (#{xml_type}) -> #{value_for_including.inspect}")
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubyfromexcel-0.0.23 lib/cells/shared/shared_formula_cell.rb
rubyfromexcel-0.0.22 lib/cells/shared/shared_formula_cell.rb
rubyfromexcel-0.0.21 lib/cells/shared/shared_formula_cell.rb
rubyfromexcel-0.0.20 lib/cells/shared/shared_formula_cell.rb
rubyfromexcel-0.0.19 lib/cells/shared/shared_formula_cell.rb
rubyfromexcel-0.0.18 lib/cells/shared/shared_formula_cell.rb
rubyfromexcel-0.0.17 lib/cells/shared/shared_formula_cell.rb
rubyfromexcel-0.0.16 lib/cells/shared/shared_formula_cell.rb
rubyfromexcel-0.0.13 lib/cells/shared/shared_formula_cell.rb