Sha256: a601ba84d8c64067abc876c6e9de1d4676d3c858075a2ab448c00c629812e344
Contents?: true
Size: 380 Bytes
Versions: 7
Compression:
Stored size: 380 Bytes
Contents
# frozen_string_literal: true class RestClient class ApiError < StandardError attr_reader :response def self.[](code) case code when 404 NotFoundError else ApiError end end def initialize(response) @response = response super(response.error_message) end end class NotFoundError < ApiError end end
Version data entries
7 entries across 7 versions & 1 rubygems