Class: RForce::SoapResponseNokogiri

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

Instance Method Summary collapse

Constructor Details

#initialize(content) ⇒ SoapResponseNokogiri

Parses an XML string into structured data.



7
8
9
# File 'lib/rforce/soap_response_nokogiri.rb', line 7

def initialize(content)
  @content = content
end

Instance Method Details

#parseObject

Digests an XML DOM node into nested Ruby types.



12
13
14
15
16
# File 'lib/rforce/soap_response_nokogiri.rb', line 12

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