summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/worksheet/sheet_calc_pr.rb
blob: d43198cf2ecbe0a7f11873830900652477332dd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# frozen_string_literal: true

module Axlsx
  # the SheetCalcPr object for the worksheet
  # This object contains calculation properties for the worksheet.
  class SheetCalcPr
    include Axlsx::OptionsParser
    include Axlsx::SerializedAttributes
    include Axlsx::Accessors
    # creates a new SheetCalcPr
    # @param [Hash] options Options for this object
    # @option [Boolean] full_calc_on_load @see full_calc_on_load
    def initialize(options = {})
      @full_calc_on_load = true
      parse_options options
    end

    boolean_attr_accessor :full_calc_on_load

    serializable_attributes :full_calc_on_load

    # Serialize the object
    # @param [String] str the string to append this objects serialized
    # content to.
    # @return [String]
    def to_xml_string(str = +'')
      str << '<sheetCalcPr '
      serialized_attributes(str)
      str << '/>'
    end
  end
end