Class: Webmention::ErrorResponse
- Inherits:
-
Object
- Object
- Webmention::ErrorResponse
- Defined in:
- lib/webmention/error_response.rb
Instance Attribute Summary collapse
- #message ⇒ String readonly
- #request ⇒ Webmention::Request readonly
Instance Method Summary collapse
-
#initialize(message, request) ⇒ Webmention::ErrorResponse
constructor
Create a new Webmention::ErrorResponse.
-
#inspect ⇒ String
:nocov:.
- #ok? ⇒ Boolean
Constructor Details
#initialize(message, request) ⇒ Webmention::ErrorResponse
Create a new Webmention::ErrorResponse.
Instances of this class represent HTTP requests that generated errors (e.g. connection error, SSL error) or that could not locate a Webmention endpoint. The nature of the error is captured in the #message
instance method.
22 23 24 25 |
# File 'lib/webmention/error_response.rb', line 22 def initialize(, request) @message = @request = request end |
Instance Attribute Details
#message ⇒ String (readonly)
6 7 8 |
# File 'lib/webmention/error_response.rb', line 6 def @message end |
#request ⇒ Webmention::Request (readonly)
9 10 11 |
# File 'lib/webmention/error_response.rb', line 9 def request @request end |
Instance Method Details
#inspect ⇒ String
:nocov:
29 30 31 32 |
# File 'lib/webmention/error_response.rb', line 29 def inspect "#<#{self.class}:#{format("%#0x", object_id)} " \ "message: #{}>" end |
#ok? ⇒ Boolean
36 37 38 |
# File 'lib/webmention/error_response.rb', line 36 def ok? false end |