Class: RForce::SoapResponseHpricot

Inherits:
Object
  • Object
show all
Defined in:
lib/rforce/soap_response_hpricot.rb

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ SoapResponseHpricot

Parses an XML string into structured data.



8
9
10
# File 'lib/rforce/soap_response_hpricot.rb', line 8

def initialize(content)
  @content = content
end

Instance Method Details

#parseObject

Digests an XML DOM node into nested Ruby types.



13
14
15
16
17
# File 'lib/rforce/soap_response_hpricot.rb', line 13

def parse
  document = Hpricot.XML(@content)
  node = document % 'soapenv:Body'
  self.class.node_to_ruby node
end