Class: Axlsx::RowBreaks
- Inherits:
-
SimpleTypedList
- Object
- Array
- SimpleTypedList
- Axlsx::RowBreaks
- Defined in:
- lib/axlsx/workbook/worksheet/row_breaks.rb
Overview
A collection of break objects that define row breaks (page breaks) for printing and preview
Instance Method Summary collapse
-
#add_break(options) ⇒ Object
Adds a row break max and man values are fixed.
-
#initialize ⇒ RowBreaks
constructor
A new instance of RowBreaks.
-
#to_xml_string(str = +'')) ⇒ Object
Constructor Details
Instance Method Details
#add_break(options) ⇒ Object
Adds a row break max and man values are fixed.
15 16 17 18 19 |
# File 'lib/axlsx/workbook/worksheet/row_breaks.rb', line 15 def add_break() # force feed the Excel default self << Break.new(.merge(max: 16383, man: true)) last end |
#to_xml_string(str = +'')) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/axlsx/workbook/worksheet/row_breaks.rb', line 26 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 |