Method: Axlsx::Styles#to_xml_string
- Defined in:
- lib/axlsx/stylesheet/styles.rb
#to_xml_string(str = '') ⇒ String
Serializes the object
486 487 488 489 490 491 492 493 |
# File 'lib/axlsx/stylesheet/styles.rb', line 486 def to_xml_string(str = '') str << ('<styleSheet xmlns="' << XML_NS << '">') instance_vals = Axlsx.instance_values_for(self) [:numFmts, :fonts, :fills, :borders, :cellStyleXfs, :cellXfs, :cellStyles, :dxfs, :tableStyles].each do |key| instance_vals[key.to_s].to_xml_string(str) unless instance_vals[key.to_s].nil? end str << '</styleSheet>' end |