Sha256: 022d671a59e62badf1053cdb82da7d05627ae2381cd868b3852f90b978d7c2ea

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 KB

Contents

module Axlsx

  # The Break class stores the details for row and column page breaks.
  # @see RowBreaks, ColBreaks
  class Break

    include Axlsx::OptionsParser
    include Axlsx::Accessors
    include Axlsx::SerializedAttributes

    # Creates a new Break object
    # @param options A hash of attribute options for this break.
    # @option options [Integer] id Zero-based row or column Id of the page break. Breaks occur above the specified row and left of the specified column.
    # @option options [Integer] min Zero-based index of start row or column of the break. For row breaks, specifies column index; for column breaks, specifies row index.
    # @option options [Integer] max Zero-based index of end row or column of the break. For row breaks, specifies column index; for column breaks, specifies row index.
    # @option options [Boolean] man Manual Break flag. 1 means the break is a manually inserted break.
    # @option option [Boolean] pt Flag indicating that a PivotTable created this break.
    def initialize(options={})
      parse_options options
      yield self if block_given?
    end

    unsigned_int_attr_accessor :id, :min, :max

    boolean_attr_accessor :man, :pt

    serializable_attributes :id, :min, :max, :man, :pt

    # serializes the break to xml
    def to_xml_string(str='')
      serialized_tag('brk', str)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caxlsx-3.2.0 lib/axlsx/workbook/worksheet/break.rb