Exception: Wordpress::ResponseError
- Defined in:
- lib/wordpress/errors.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(json = {}) ⇒ ResponseError
constructor
A new instance of ResponseError.
Methods inherited from Error
Constructor Details
#initialize(json = {}) ⇒ ResponseError
Returns a new instance of ResponseError.
17 18 19 20 |
# File 'lib/wordpress/errors.rb', line 17 def initialize(json = {}) @error = json['error'] || 'unknown' super json['message'] end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
15 16 17 |
# File 'lib/wordpress/errors.rb', line 15 def error @error end |