Class: Axlsx::DefinedNames

Inherits:
SimpleTypedList
  • Object
show all
Defined in:
lib/axlsx/workbook/defined_names.rb

Overview

a simple types list of DefinedName objects

Instance Method Summary collapse

Constructor Details

#initializeDefinedNames

creates the DefinedNames object



6
7
8
# File 'lib/axlsx/workbook/defined_names.rb', line 6

def initialize
  super DefinedName
end

Instance Method Details

#to_xml_string(str = '') ⇒ String

Serialize to xml

Parameters:

  • str (String) (defaults to: '')

Returns:

  • (String)


13
14
15
16
17
18
# File 'lib/axlsx/workbook/defined_names.rb', line 13

def to_xml_string(str = '')
  return if @list.empty?
  str << "<definedNames>"
  each { |defined_name| defined_name.to_xml_string(str) }
  str << '</definedNames>'
end