Sha256: dc692da99d3d192a308b3df0cb5ec24248d5780b1fcadbc26cf04e1152bc8ae0

Contents?: true

Size: 507 Bytes

Versions: 19

Compression:

Stored size: 507 Bytes

Contents

module Axlsx

  # The cols class manages the col object used to manage column widths. 
  # This is where the magic happens with autowidth
  class Cols < SimpleTypedList

    def initialize(worksheet)
      raise ArgumentError, "you must provide a worksheet" unless worksheet.is_a?(Worksheet)
      super Col
      @worksheet = worksheet
    end

    def to_xml_string(str = '')
     return if empty?
     str << '<cols>'
     each { |item| item.to_xml_string(str) }
     str << '</cols>' 
    end
  end
end

Version data entries

19 entries across 19 versions & 5 rubygems

Version Path
bonio-axlsx-2.2.3 lib/axlsx/workbook/worksheet/cols.rb
caxlsx-2.0.2 lib/axlsx/workbook/worksheet/cols.rb
bonio-axlsx-2.2.2 lib/axlsx/workbook/worksheet/cols.rb
bonio-axlsx-2.2.1 lib/axlsx/workbook/worksheet/cols.rb
dg-axlsx-2.1.0 lib/axlsx/workbook/worksheet/cols.rb
axlsx-2.1.0.pre lib/axlsx/workbook/worksheet/cols.rb
l_axlsx-2.0.1 lib/axlsx/workbook/worksheet/cols.rb
axlsx-2.0.1 lib/axlsx/workbook/worksheet/cols.rb
axlsx-2.0.0 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.3.6 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.3.5 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.3.4 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.3.3 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.3.2 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.3.1 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.2.3 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.2.2 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.2.1 lib/axlsx/workbook/worksheet/cols.rb
axlsx-1.2.0 lib/axlsx/workbook/worksheet/cols.rb