X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2f838921c0c1bb0ca2bb85d80edda83e115aaca2..2de26d54ef22c5653f830d0ce4938df78d0ca0fd:/lib/osm.rb?ds=sidebyside 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