Class: JasperClient::RepositoryService::Response::RunReportResponse
- Inherits:
-
JasperClient::RepositoryService::Response
- Object
- JasperClient::RepositoryService::Response
- JasperClient::RepositoryService::Response::RunReportResponse
- Defined in:
- lib/jasper-client/jasper_client.rb
Overview
Response from a runReport request.
Instance Attribute Summary collapse
-
#http ⇒ Object
readonly
Returns the value of attribute http.
Attributes inherited from JasperClient::RepositoryService::Response
Instance Method Summary collapse
-
#initialize(savon_response) ⇒ RunReportResponse
constructor
A new instance of RunReportResponse.
-
#parts ⇒ Object
return the multipart related parts from the http response.
Methods inherited from JasperClient::RepositoryService::Response
#collect_resources, #message, #return_code, #search, #success?
Constructor Details
#initialize(savon_response) ⇒ RunReportResponse
215 216 217 218 219 220 221 222 |
# File 'lib/jasper-client/jasper_client.rb', line 215 def initialize(savon_response) savon_response.tap do |soap| @http = soap.http xml = http.multipart? ? http.start_part : soap.http.body # soap.to_hash.fetch(:run_report_response).fetch(:run_report_return) soap_doc = Nokogiri::XML xml @xml_doc = Nokogiri::XML soap_doc.search('//runReportReturn/node()').inner_text end end |
Instance Attribute Details
#http ⇒ Object (readonly)
Returns the value of attribute http.
214 215 216 |
# File 'lib/jasper-client/jasper_client.rb', line 214 def http @http end |
Instance Method Details
#parts ⇒ Object
return the multipart related parts from the http response. When the response is not multipart, an empty list is returned.
226 227 228 |
# File 'lib/jasper-client/jasper_client.rb', line 226 def parts http.multipart? ? http.parts : [] end |