Class: Exlibris::Primo::WebService::Response::Base
- Inherits:
-
Object
- Object
- Exlibris::Primo::WebService::Response::Base
- Includes:
- Abstract, Namespaces, Error, Util, XmlUtil
- Defined in:
- lib/exlibris/primo/web_service/response/base.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(savon_response, soap_action) ⇒ Base
constructor
A new instance of Base.
Methods included from XmlUtil
included, #to_hash, #to_json, #to_xml
Methods included from Util
Methods included from Namespaces
Methods included from Error
#error, #error?, #error_code, #error_message
Methods included from Abstract
Constructor Details
#initialize(savon_response, soap_action) ⇒ Base
Returns a new instance of Base.
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/exlibris/primo/web_service/response/base.rb', line 16 def initialize savon_response, soap_action super @savon_response = savon_response @code = savon_response.http.code @body = savon_response.http.body @soap_action = soap_action # Primo's XML is unescaped trash that Nokogiri chokes on. # Force & to & and avoid double escaping # This is a complete HACK. @raw_xml = savon_response.body[response_key][return_key]. gsub('&', '&').gsub('&', '&') end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
13 14 15 |
# File 'lib/exlibris/primo/web_service/response/base.rb', line 13 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
13 14 15 |
# File 'lib/exlibris/primo/web_service/response/base.rb', line 13 def code @code end |