Class: Axlsx::Cols
- Inherits:
-
SimpleTypedList
- Object
- Array
- SimpleTypedList
- Axlsx::Cols
- Defined in:
- lib/axlsx/workbook/worksheet/cols.rb
Overview
The cols class manages the col object used to manage column widths. This is where the magic happens with autowidth
Instance Method Summary collapse
-
#initialize(worksheet) ⇒ Cols
constructor
A new instance of Cols.
-
#to_xml_string(str = +'')) ⇒ String
Serialize the Cols object.
Constructor Details
Instance Method Details
#to_xml_string(str = +'')) ⇒ String
Serialize the Cols object
17 18 19 20 21 22 23 |
# File 'lib/axlsx/workbook/worksheet/cols.rb', line 17 def to_xml_string(str = +'') return if empty? str << '<cols>' each { |item| item.to_xml_string(str) } str << '</cols>' end |