Class: PeopleDoc::ResponseHandlers::V1::HandleBadRequest::ErrorsResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/people_doc/response_handlers.rb

Instance Method Summary collapse

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

#callObject



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