Method: Axlsx::SortCondition#to_xml_string
- Defined in:
- lib/axlsx/workbook/worksheet/auto_filter/sort_condition.rb
#to_xml_string(str, ref) ⇒ String
serialize the object
41 42 43 44 45 46 47 48 49 |
# File 'lib/axlsx/workbook/worksheet/auto_filter/sort_condition.rb', line 41 def to_xml_string(str, ref) ref = ref_to_single_column(ref, column_index) str << "<sortCondition " str << "descending='1' " if order == :desc str << "ref='#{ref}' " str << "customList='#{custom_list.join(',')}' " unless custom_list.empty? str << "/>" end |