Sha256: 8b66384d6644910f72cf02603e31c827f266971c18ad9a27bb2f925068d61b4b

Contents?: true

Size: 395 Bytes

Versions: 6

Compression:

Stored size: 395 Bytes

Contents

module RubyFromExcel
  class FormulaCell < Cell
    attr_accessor :ast
  
    def parse_xml(xml)
      super
      self.ast = Formula.parse(xml.at_css("f").content)
    end
  
    def work_out_dependencies
      self.dependencies ||= ast.visit(DependencyBuilder.new(self))
    end
    
    def ruby_value
      "@#{reference.to_ruby} ||= #{ast.visit(FormulaBuilder.new(self))}"
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubyfromexcel-0.0.10 lib/cells/formula/formula_cell.rb
rubyfromexcel-0.0.9 lib/cells/formula/formula_cell.rb
rubyfromexcel-0.0.7 lib/cells/formula/formula_cell.rb
rubyfromexcel-0.0.6 lib/cells/formula/formula_cell.rb
rubyfromexcel-0.0.5 lib/cells/formula/formula_cell.rb
rubyfromexcel-0.0.4 lib/cells/formula/formula_cell.rb