class UrlReader::ReadError
Constants
- InternalServerError
- PageNotFound
- RequestTimeout
- UnidentifiedError
Attributes
type[R]
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
UrlReader::BaseError::new
# File lib/url_reader/read_error.rb, line 9 def initialize(*args) super(*args) inner = args[0] @type = if inner.is_a?(RestClient::ResourceNotFound) PageNotFound elsif inner.is_a?(RestClient::RequestTimeout) RequestTimeout elsif inner.is_a?(RestClient::InternalServerError) InternalServerError else UnidentifiedError end end