Method: Axlsx::TableStyles#to_xml_string
- Defined in:
- lib/axlsx/stylesheet/table_styles.rb
#to_xml_string(str = '') ⇒ String
Serializes the object
31 32 33 34 35 36 37 38 39 |
# File 'lib/axlsx/stylesheet/table_styles.rb', line 31 def to_xml_string(str = '') attr = self.instance_values.reject {|k, v| ![:defaultTableStyle, :defaultPivotStyle].include?(k.to_sym) } attr[:count] = self.size str << '<tableStyles ' str << attr.map { |key, value| '' << key.to_s << '="' << value.to_s << '"' }.join(' ') str << '>' each { |table_style| table_style.to_xml_string(str) } str << '</tableStyles>' end |