Method: Osm::Event::BadgeLink#<=>

Defined in:
lib/osm/event.rb

#<=>(another) ⇒ Object

Compare BadgeLink based on section, type, badge_name, requirement_label, data



626
627
628
629
630
631
632
# File 'lib/osm/event.rb', line 626

def <=>(another)
  [:badge_section, :badge_type, :badge_name, :requirement_label].each do |attribute|
    result = self.try(:data) <=> another.try(:data)
    return result unless result == 0
  end
  return self.try(:data) <=> another.try(:data)
end