Ember.Comparable Class packages/ember-runtime/lib/mixins/comparable.js:8
Implements some standard methods for comparing objects. Add this mixin to any class you create that can compare its instances.
You should implement the
Required. You must implement this method to apply this mixin.
Override to return the result of the comparison of the two parameters. The compare method should return:
a < b
a == b
a > b
Default implementation raises an exception.
- a Object
- the first object to compare
- b Object
- the second object to compare
- the result of the comparison