Method: Axlsx::ColorScale#to_xml_string

Defined in:
lib/axlsx/workbook/worksheet/color_scale.rb

#to_xml_string(str = '') ⇒ String

Serialize this color_scale object data to an xml string

Parameters:

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

Returns:

  • (String)


52
53
54
55
56
57
# File 'lib/axlsx/workbook/worksheet/color_scale.rb', line 52

def to_xml_string(str = '')
  str << '<colorScale>'
  @value_objects.each { |cfvo| cfvo.to_xml_string(str) }
  @colors.each { |color| color.to_xml_string(str) }
  str << '</colorScale>'
end