Class: DeviantArt::Error
Instance Attribute Summary collapse
-
#error ⇒ Object
:method: status_code This is the HTTP status code of response.
-
#error_code ⇒ Object
:method: status_code This is the HTTP status code of response.
-
#error_description ⇒ Object
:method: status_code This is the HTTP status code of response.
-
#error_details ⇒ Object
:method: status_code This is the HTTP status code of response.
-
#status_code ⇒ Object
:method: status_code This is the HTTP status code of response.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(json, status_code) ⇒ Error
constructor
A new instance of Error.
- #to_s ⇒ Object
Methods inherited from Base
point_to_class, points_class_mapping
Constructor Details
#initialize(json, status_code) ⇒ Error
Returns a new instance of Error.
30 31 32 33 |
# File 'lib/deviantart/error.rb', line 30 def initialize(json, status_code) super(json) @status_code = status_code end |
Instance Attribute Details
#error ⇒ Object
:method: status_code This is the HTTP status code of response.
28 29 30 |
# File 'lib/deviantart/error.rb', line 28 def error @error end |
#error_code ⇒ Object
:method: status_code This is the HTTP status code of response.
28 29 30 |
# File 'lib/deviantart/error.rb', line 28 def error_code @error_code end |
#error_description ⇒ Object
:method: status_code This is the HTTP status code of response.
28 29 30 |
# File 'lib/deviantart/error.rb', line 28 def error_description @error_description end |
#error_details ⇒ Object
:method: status_code This is the HTTP status code of response.
28 29 30 |
# File 'lib/deviantart/error.rb', line 28 def error_details @error_details end |
#status_code ⇒ Object
:method: status_code This is the HTTP status code of response.
28 29 30 |
# File 'lib/deviantart/error.rb', line 28 def status_code @status_code end |
Instance Method Details
#to_s ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/deviantart/error.rb', line 35 def to_s = [] << self.class.name << "status_code: #{@status_code}" << "error_code: #{@error_code}" if @error_code << "error: #{@error}" if @error << "error_description: #{@error_description}" if @error_description << "error_details: #{@error_details}" if @error_details .join(', ') end |