X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/4d91fe3dd95c1058cb8d24fd4c900223e30b9059..3da2a95cea6b5efa760b378b45d9223d4b76657d:/lib/osm.rb diff --git a/lib/osm.rb b/lib/osm.rb index 3da9671c1..393011dac 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -281,6 +281,23 @@ module OSM end end + # Raised when the note provided is already closed + class APINoteAlreadyClosedError < APIError + def initialize(note) + @note = note + end + + attr_reader :note + + def status + :conflict + end + + def to_s + "The note #{@note.id} was closed at #{@note.closed_at}" + end + end + # Helper methods for going to/from mercator and lat/lng. class Mercator include Math