Class: USaidWat::Algorithms::CountAlgorithm
- Defined in:
- lib/usaidwat/algo.rb
Instance Attribute Summary
Attributes inherited from Algorithm
Instance Method Summary collapse
Methods inherited from Algorithm
Constructor Details
This class inherits a constructor from USaidWat::Algorithms::Algorithm
Instance Method Details
#sort(a, b) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/usaidwat/algo.rb', line 22 def sort(a, b) if buckets[a] == buckets[b] a.downcase <=> b.downcase else buckets[b] <=> buckets[a] end end |