Exception: Wordpress::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- Wordpress::ResponseError
- Defined in:
- lib/wordpress/errors.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(json = {}) ⇒ ResponseError
constructor
A new instance of ResponseError.
- #to_s ⇒ Object
Constructor Details
#initialize(json = {}) ⇒ ResponseError
Returns a new instance of ResponseError.
5 6 7 8 |
# File 'lib/wordpress/errors.rb', line 5 def initialize(json = {}) @error = json['error'] || 'unknown' @message = json['message'] end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
3 4 5 |
# File 'lib/wordpress/errors.rb', line 3 def error @error end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/wordpress/errors.rb', line 3 def @message end |
Instance Method Details
#to_s ⇒ Object
10 11 12 |
# File 'lib/wordpress/errors.rb', line 10 def to_s @message end |