Class: RubyFromExcel::SingleCellArrayFormulaCell
- Inherits:
-
FormulaCell
- Object
- Cell
- FormulaCell
- RubyFromExcel::SingleCellArrayFormulaCell
- Defined in:
- lib/cells/array/single_cell_array_formula_cell.rb
Instance Attribute Summary
Attributes inherited from FormulaCell
Attributes inherited from Cell
#dependencies, #reference, #worksheet, #xml_type, #xml_value
Instance Method Summary collapse
Methods inherited from FormulaCell
#debug, #parse_xml, #work_out_dependencies
Methods inherited from Cell
#alter_other_cells_if_required, #can_be_replaced_with_value?, #debug, #initialize, #inspect, #parse_xml, #test, #to_ruby, #to_s, #to_test, #tolerance_for, #value, #value_for_including, #work_out_dependencies
Constructor Details
This class inherits a constructor from RubyFromExcel::Cell
Instance Method Details
#ruby_value ⇒ Object
6 7 8 9 10 |
# File 'lib/cells/array/single_cell_array_formula_cell.rb', line 6 def ruby_value ruby_code = ast.visit(SingleCellArrayFormulaBuilder.new(self)) ruby_code = "(#{ruby_code}).array_formula_offset(0,0)" if ruby_code =~ /^m\(.*\}$/ "@#{reference.to_ruby} ||= #{ruby_code}" end |