Method: MIME::Type#priority_compare
- Defined in:
- lib/mime/type.rb
#priority_compare(other) ⇒ Object
Compares the other MIME::Type using a pre-computed sort priority value, then the simplified representation for an alphabetical sort.
For the next major version of MIME::Types, this method will become #<=> and #priority_compare will be removed.
203 204 205 206 207 208 209 |
# File 'lib/mime/type.rb', line 203 def priority_compare(other) if (cmp = __sort_priority <=> other.__sort_priority) == 0 simplified <=> other.simplified else cmp end end |