summaryrefslogtreecommitdiffhomepage
path: root/lib/axlsx/workbook/defined_names.rb
blob: abe8197a3e9b2866edc4089b690de5c763ac0e49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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