Method: JsDuck::Categories::Auto#cat_compare
- Defined in:
- lib/jsduck/categories/auto.rb
#cat_compare(a, b) ⇒ Object
Comparison function for sorting categories that always places “Others…” category at the end.
70 71 72 73 74 75 76 77 78 |
# File 'lib/jsduck/categories/auto.rb', line 70 def cat_compare(a, b) if a["name"] == "Others..." 1 elsif b["name"] == "Others..." -1 else a["name"] <=> b["name"] end end |