Sha256: 44a355d0c9bce60302b522d8520eb5b929b8ef8c3f14067eced22b9552acd733
Contents?: true
Size: 945 Bytes
Versions: 4
Compression:
Stored size: 945 Bytes
Contents
# frozen_string_literal: true module Axlsx # A collection of break objects that define row breaks (page breaks) for printing and preview class RowBreaks < SimpleTypedList def initialize super(Break) end # Adds a row break # @param [Hash] options The options for the break to be created. # max and man values are fixed. # @see Break def add_break(options) # force feed the Excel default self << Break.new(options.merge(max: 16383, man: true)) last end # <rowBreaks count="3" manualBreakCount="3"> # <brk id="1" max="16383" man="1"/> # <brk id="7" max="16383" man="1"/> # <brk id="13" max="16383" man="1"/> # </rowBreaks> def to_xml_string(str = +'') return if empty? str << '<rowBreaks count="' << size.to_s << '" manualBreakCount="' << size.to_s << '">' each { |brk| brk.to_xml_string(str) } str << '</rowBreaks>' end end end
Version data entries
4 entries across 4 versions & 2 rubygems