Sha256: 3d47466d25e5e9d29d459ab0df6dcbd0b6250e18b2acd7da1cf8f3588a51f4b9

Contents?: true

Size: 669 Bytes

Versions: 56

Compression:

Stored size: 669 Bytes

Contents

# -*- encoding: utf-8 -*-
require 'write_xlsx/package/xml_writer_simple'

module Writexlsx
  class Formats
    include Writexlsx::Utility

    attr_reader :formats, :xf_format_indices, :dxf_format_indices

    def initialize
      @formats = []
      @xf_format_indices = {}
      @dxf_format_indices = {}
    end

    def xf_index_by_key(key)
      @xf_format_indices[key]
    end

    def set_xf_index_by_key(key)
      @xf_format_indices[key] ||= 1 + @xf_format_indices.size
    end

    def dxf_index_by_key(key)
      @dxf_format_indices[key]
    end

    def set_dxf_index_by_key(key)
      @dxf_format_indices[key] ||= @dxf_format_indices.size
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
write_xlsx-1.09.4 lib/write_xlsx/formats.rb
write_xlsx-1.09.3 lib/write_xlsx/formats.rb
write_xlsx-1.09.2 lib/write_xlsx/formats.rb
write_xlsx-1.09.1 lib/write_xlsx/formats.rb
write_xlsx-1.09.0 lib/write_xlsx/formats.rb
write_xlsx-1.08.2 lib/write_xlsx/formats.rb
write_xlsx-1.08.1 lib/write_xlsx/formats.rb
write_xlsx-1.08.0 lib/write_xlsx/formats.rb
write_xlsx-1.07.0 lib/write_xlsx/formats.rb
write_xlsx-1.04.0 lib/write_xlsx/formats.rb
write_xlsx-1.02.0 lib/write_xlsx/formats.rb
write_xlsx-1.01.0 lib/write_xlsx/formats.rb
write_xlsx-1.00.0 lib/write_xlsx/formats.rb
write_xlsx-0.99.0 lib/write_xlsx/formats.rb
write_xlsx-0.97.0 lib/write_xlsx/formats.rb
write_xlsx-0.90.0 lib/write_xlsx/formats.rb
write_xlsx-0.89.0 lib/write_xlsx/formats.rb
write_xlsx-0.88.0 lib/write_xlsx/formats.rb
write_xlsx-0.87.0 lib/write_xlsx/formats.rb
write_xlsx-0.86.0 lib/write_xlsx/formats.rb