summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2013-09-09 10:31:06 +0900
committerRandy Morgan <[email protected]>2013-09-13 00:08:39 +0900
commitcef93d7501cd25615a4dfc1d1b143fbe7babfbd5 (patch)
tree06d15e0e97b3d2fb92e90d8dce9340db89cb5e40
parent591b38a9ff4e96459a09b9e0e549289db237fbf3 (diff)
downloadcaxlsx-cef93d7501cd25615a4dfc1d1b143fbe7babfbd5.tar.gz
caxlsx-cef93d7501cd25615a4dfc1d1b143fbe7babfbd5.zip
docs for ColBreaks
-rw-r--r--lib/axlsx/workbook/worksheet/col_breaks.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/axlsx/workbook/worksheet/col_breaks.rb b/lib/axlsx/workbook/worksheet/col_breaks.rb
index 2bf927e1..a519ba5f 100644
--- a/lib/axlsx/workbook/worksheet/col_breaks.rb
+++ b/lib/axlsx/workbook/worksheet/col_breaks.rb
@@ -1,16 +1,27 @@
module Axlsx
+ # A collection of Brake objects.
+ # Please do not use this class directly. Instead use
+ # Worksheet#add_break
class ColBreaks < SimpleTypedList
+ # Instantiates a new list restricted to Break types
def initialize
super Break
end
+ # A column break specific helper for adding a break.
+ # @param [Hash] options A list of options to pass into the Break object
+ # The max and man options are fixed, however any other valid option for
+ # Break will be passed to the created break object.
+ # @see Break
def add_break(options)
options.merge max: 1048575, man: true
@list << Break.new(options)
end
+ # Serialize the collection to xml
+ # @param [String] str The string to append this lists xml to.
def to_xml_string(str='')
return if empty?
str << '<colBreaks count="' << @list.size << '" manualBreakCount="' << @list.size << '">'