Method: Axlsx::ContentType#to_xml_string

Defined in:
lib/axlsx/content_type/content_type.rb

#to_xml_string(str = '') ⇒ String

Serializes the object

Parameters:

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

Returns:

  • (String)


16
17
18
19
20
21
# File 'lib/axlsx/content_type/content_type.rb', line 16

def to_xml_string(str = '')
  str << '<?xml version="1.0" encoding="UTF-8"?>'
  str << '<Types xmlns="' << XML_NS_T << '">'
  each { |type| type.to_xml_string(str) }
  str << '</Types>'
end