Class: RForce::SoapResponseRexml
- Inherits:
-
Object
- Object
- RForce::SoapResponseRexml
- Includes:
- MethodKeys, SoapPullable
- Defined in:
- lib/rforce/soap_response_rexml.rb
Overview
Turns an XML response from the server into a Ruby object whose methods correspond to nested XML elements.
Constant Summary
Constants included from SoapPullable
RForce::SoapPullable::SOAP_ENVELOPE
Instance Method Summary collapse
-
#initialize(content) ⇒ SoapResponseRexml
constructor
A new instance of SoapResponseRexml.
-
#parse ⇒ Object
Parses an XML string into structured data.
Methods included from MethodKeys
Methods included from SoapPullable
#local, #tag_end, #tag_start, #text
Constructor Details
#initialize(content) ⇒ SoapResponseRexml
Returns a new instance of SoapResponseRexml.
18 19 20 |
# File 'lib/rforce/soap_response_rexml.rb', line 18 def initialize(content) @content = content end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class RForce::MethodKeys
Instance Method Details
#parse ⇒ Object
Parses an XML string into structured data.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/rforce/soap_response_rexml.rb', line 23 def parse @current_value = nil @stack = [] @parsed = {} @done = false @namespaces = [] REXML::Document.parse_stream @content, self @parsed end |