X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/5f2a5cadcb693b34b81a9232b8879c3b4f12843d..64d41eac67ecdb3622c519cae9db6f9205e59bdc:/lib/osm.rb diff --git a/lib/osm.rb b/lib/osm.rb index 46f37036f..b0c314cbc 100644 --- a/lib/osm.rb +++ b/lib/osm.rb @@ -51,14 +51,14 @@ module OSM # Raised when to delete an already-deleted object. class APIAlreadyDeletedError < APIError - def initialize(object = "object", object_id = "") - @object = object - @object_id = object_id + def initialize(type = "object", id = "") + @type = type + @id = id - super("The #{object} with the id #{object_id} has already been deleted") + super("The #{type} with the id #{id} has already been deleted") end - attr_reader :object, :object_id + attr_reader :type, :id def status :gone @@ -506,10 +506,10 @@ module OSM end # Parse a float, raising a specified exception on failure - def self.parse_float(str, klass, *args) + def self.parse_float(str, klass, *) Float(str) rescue StandardError - raise klass.new(*args) + raise klass.new(*) end # Construct a random token of a given length