the Ruby builtin mixin Comparable, so that Items in a list can be sorted by item count in descending order, followed by total price in descending order, followed by item name in alphabetic order. Documentation for Comparable can found at https://rubyapi.org/2.6/o/ comparable.
Fig: 1