Method: Osm::Model#<=>
- Defined in:
- lib/osm/model.rb
#<=>(another) ⇒ Object
Compare functions
49 50 51 52 53 |
# File 'lib/osm/model.rb', line 49 def <=>(another) us_values = self.class::SORT_BY.map{ |i| self.try(i) } them_values = self.class::SORT_BY.map{ |i| another.try(i) } us_values <=> them_values end |