Sha256: 3221e5bdffd101258d6a8230f2b19cdaa9127a4856d945ad7b20a9b71203cf10

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

module Axlsx
  # The OutlinePr class manages serialization of a worksheet's outlinePr element, which provides various
  # options to control outlining.
  class OutlinePr
    include Axlsx::OptionsParser
    include Axlsx::Accessors
    include Axlsx::SerializedAttributes

    serializable_attributes :summary_below,
                            :summary_right,
                            :apply_styles

    # These attributes are all boolean so I'm doing a bit of a hand
    # waving magic show to set up the attriubte accessors
    boolean_attr_accessor :summary_below,
                          :summary_right,
                          :apply_styles

    # Creates a new OutlinePr object
    # @param [Hash] options used to create the outline_pr
    def initialize(options = {})
      parse_options options
    end

    # Serialize the object
    # @param [String] str serialized output will be appended to this object if provided.
    # @return [String]
    def to_xml_string(str = +'')
      str << '<outlinePr '
      serialized_attributes(str)
      str << '/>'
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/caxlsx-4.1.0/lib/axlsx/workbook/worksheet/outline_pr.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/caxlsx-4.1.0/lib/axlsx/workbook/worksheet/outline_pr.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/caxlsx-4.1.0/lib/axlsx/workbook/worksheet/outline_pr.rb
caxlsx-4.1.0 lib/axlsx/workbook/worksheet/outline_pr.rb
caxlsx-4.0.0 lib/axlsx/workbook/worksheet/outline_pr.rb