Class: RubyFromExcel::SharedFormulaBuilder

Inherits:
FormulaBuilder show all
Defined in:
lib/cells/shared/shared_formula_builder.rb

Constant Summary

Constants inherited from FormulaBuilder

FormulaBuilder::COMPARATOR_CONVERSIONS, FormulaBuilder::OPERATOR_CONVERSIONS

Instance Attribute Summary collapse

Attributes inherited from FormulaBuilder

#formula_cell

Instance Method Summary collapse

Methods inherited from FormulaBuilder

#area, #arithmetic, #attempt_to_calculate_index, #attempt_to_calculate_match, #attempt_to_parse_indirect, #boolean_false, #boolean_true, #brackets, #column_range, #comparator, #comparison, excel_function, #external_reference, #formula, #function, #index_function, #indirect_function, #local_table_reference, #match_function, #named_reference, #null, #number, #operator, #parse_and_visit, #percentage, #prefix, #range_for, #row_range, #sheet_reference, #single_value_for, #standard_function, #string, #string_join, #table_reference

Constructor Details

#initialize(formula_cell = nil, shared_formula_offset = nil) ⇒ SharedFormulaBuilder

Returns a new instance of SharedFormulaBuilder.



5
6
7
8
# File 'lib/cells/shared/shared_formula_builder.rb', line 5

def initialize(formula_cell = nil, shared_formula_offset = nil)
  super formula_cell
  self.shared_formula_offset = shared_formula_offset
end

Instance Attribute Details

#shared_formula_offsetObject

Returns the value of attribute shared_formula_offset.



3
4
5
# File 'lib/cells/shared/shared_formula_builder.rb', line 3

def shared_formula_offset
  @shared_formula_offset
end

Instance Method Details

#cell(reference) ⇒ Object



10
11
12
# File 'lib/cells/shared/shared_formula_builder.rb', line 10

def cell(reference)
  Reference.new(reference).shift!(shared_formula_offset).to_ruby
end