Class: PeopleDoc::ResponseHandlers::V1::HandleBadRequest::ErrorsResponse
- Inherits:
-
Object
- Object
- PeopleDoc::ResponseHandlers::V1::HandleBadRequest::ErrorsResponse
- Defined in:
- lib/people_doc/response_handlers.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(response) ⇒ ErrorsResponse
constructor
A new instance of ErrorsResponse.
Constructor Details
#initialize(response) ⇒ ErrorsResponse
Returns a new instance of ErrorsResponse.
74 75 76 |
# File 'lib/people_doc/response_handlers.rb', line 74 def initialize(response) @response = response end |
Instance Method Details
#call ⇒ Object
78 79 80 81 82 83 |
# File 'lib/people_doc/response_handlers.rb', line 78 def call @response .parsed_response['errors'] .map { |error| error['msg'] } .join("\r\n") end |