Class: ODDB::FiPDF::SubstanceIndex
- Defined in:
- ext/fipdf/src/substance_index.rb
Instance Method Summary collapse
Methods inherited from Hash
Instance Method Details
#sort ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'ext/fipdf/src/substance_index.rb', line 13 def sort arr = sort_by { |key, element| ODDB.search_term(key).downcase } arr.each { |key, element| element.sort! } arr end |
#store(key, value) ⇒ Object
7 8 9 10 11 12 |
# File 'ext/fipdf/src/substance_index.rb', line 7 def store(key, value) value.collect! { |val| val.to_s } (self[key] ||= []).push(value) end |