Sha256: 2264e7c067030d36bd95de2a4c5e578a2bf424650cdd05977f27ce56397d3c7c

Contents?: true

Size: 491 Bytes

Versions: 5

Compression:

Stored size: 491 Bytes

Contents

# frozen_string_literal: true

module Axlsx
  # a simple types list of DefinedName objects
  class DefinedNames < SimpleTypedList
    # creates the DefinedNames object
    def initialize
      super(DefinedName)
    end

    # Serialize to xml
    # @param [String] str
    # @return [String]
    def to_xml_string(str = +'')
      return if empty?

      str << '<definedNames>'
      each { |defined_name| defined_name.to_xml_string(str) }
      str << '</definedNames>'
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
caxlsx-4.2.0 lib/axlsx/workbook/defined_names.rb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/caxlsx-4.1.0/lib/axlsx/workbook/defined_names.rb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/caxlsx-4.1.0/lib/axlsx/workbook/defined_names.rb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/caxlsx-4.1.0/lib/axlsx/workbook/defined_names.rb
caxlsx-4.1.0 lib/axlsx/workbook/defined_names.rb