Sha256: 608099c9ea80a04b69cf17e726497fa36952eafad4c107fe9d53a88a352969ad

Contents?: true

Size: 388 Bytes

Versions: 1

Compression:

Stored size: 388 Bytes

Contents

module Mountapi
  module Error
    class RouteNotFound < StandardError
      def initialize(url, method)
        @url = url
        @method = method
        super(title)
      end

      def to_json_api
        {
          title: title,
          status: 404
        }
      end

      private

      def title
        "Resource not found: #{@method} #{@url}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mountapi-0.11.1 lib/mountapi/error/route_not_found.rb