Exception: WpApiClient::ErrorResponse
- Inherits:
-
StandardError
- Object
- StandardError
- WpApiClient::ErrorResponse
- Defined in:
- lib/wp_api_client.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(json) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
Constructor Details
#initialize(json) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
39 40 41 42 |
# File 'lib/wp_api_client.rb', line 39 def initialize(json) @error = OpenStruct.new(json) @status = @error.data["status"] end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
36 37 38 |
# File 'lib/wp_api_client.rb', line 36 def error @error end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
37 38 39 |
# File 'lib/wp_api_client.rb', line 37 def status @status end |