Class: Xlsxrb::Elements::Formula

Inherits:
Data
  • Object
show all
Defined in:
lib/xlsxrb/elements/types.rb

Overview

Represents a formula with an optional cached value. Optional: type (:shared, :array), ref (range), shared_index (si for shared formulas)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(expression:, cached_value: nil, type: nil, ref: nil, shared_index: nil, calculate_always: nil, aca: nil, bx: nil, dt2d: nil, dtr: nil, r1: nil, r2: nil) ⇒ Formula

rubocop:disable Naming/MethodParameterName



8
9
10
# File 'lib/xlsxrb/elements/types.rb', line 8

def initialize(expression:, cached_value: nil, type: nil, ref: nil, shared_index: nil, calculate_always: nil, aca: nil, bx: nil, dt2d: nil, dtr: nil, r1: nil, r2: nil) # rubocop:disable Naming/MethodParameterName
  super
end

Instance Attribute Details

#acaObject (readonly)

Returns the value of attribute aca

Returns:

  • (Object)

    the current value of aca



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def aca
  @aca
end

#bxObject (readonly)

Returns the value of attribute bx

Returns:

  • (Object)

    the current value of bx



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def bx
  @bx
end

#cached_valueObject (readonly)

Returns the value of attribute cached_value

Returns:

  • (Object)

    the current value of cached_value



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def cached_value
  @cached_value
end

#calculate_alwaysObject (readonly)

Returns the value of attribute calculate_always

Returns:

  • (Object)

    the current value of calculate_always



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def calculate_always
  @calculate_always
end

#dt2dObject (readonly)

Returns the value of attribute dt2d

Returns:

  • (Object)

    the current value of dt2d



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def dt2d
  @dt2d
end

#dtrObject (readonly)

Returns the value of attribute dtr

Returns:

  • (Object)

    the current value of dtr



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def dtr
  @dtr
end

#expressionObject (readonly)

Returns the value of attribute expression

Returns:

  • (Object)

    the current value of expression



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def expression
  @expression
end

#r1Object (readonly)

Returns the value of attribute r1

Returns:

  • (Object)

    the current value of r1



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def r1
  @r1
end

#r2Object (readonly)

Returns the value of attribute r2

Returns:

  • (Object)

    the current value of r2



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def r2
  @r2
end

#refObject (readonly)

Returns the value of attribute ref

Returns:

  • (Object)

    the current value of ref



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def ref
  @ref
end

#shared_indexObject (readonly)

Returns the value of attribute shared_index

Returns:

  • (Object)

    the current value of shared_index



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def shared_index
  @shared_index
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



7
8
9
# File 'lib/xlsxrb/elements/types.rb', line 7

def type
  @type
end