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
Returns a new instance of RunReportResponse.
199 200 201 202 203 204 205 206 |
# File 'lib/jasper-client/jasper_client.rb', line 199 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.
198 199 200 |
# File 'lib/jasper-client/jasper_client.rb', line 198 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.
210 211 212 |
# File 'lib/jasper-client/jasper_client.rb', line 210 def parts http.multipart? ? http.parts : [] end |