X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/6279d83260cd9a03395a73f1c3df66ffe4c9486d..ae27f7adbe561b20203fa639ac1aa50d0408edc0:/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