Method: IsoDoc::PresentationXMLConvert#sort_indexterms
- Defined in:
- lib/isodoc/presentation_function/index.rb
#sort_indexterms(terms, see, also) ⇒ Object
121 122 123 124 125 126 127 128 129 |
# File 'lib/isodoc/presentation_function/index.rb', line 121 def sort_indexterms(terms, see, also) index = extract_indexterms(terms) index = extract_indexsee(index, see, :see) index = extract_indexsee(index, also, :also) index.keys.sort.each_with_object({}) do |k, v| v[sortable(k)[0].upcase.transliterate] ||= {} v[sortable(k)[0].upcase.transliterate][k] = index[k] end end |