Class: ChangeHealthcare::XmlResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/change_healthcare/xml_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ XmlResponse

Returns a new instance of XmlResponse.



4
5
6
7
# File 'lib/change_healthcare/xml_response.rb', line 4

def initialize(response)
  @response = response
  @xml = Nokogiri::XML(response.body)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(m, *args, &block) ⇒ Object



9
10
11
# File 'lib/change_healthcare/xml_response.rb', line 9

def method_missing(m, *args, &block)
  response.send(m, *args, &block)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/change_healthcare/xml_response.rb', line 3

def response
  @response
end

#xmlObject (readonly)

Returns the value of attribute xml.



3
4
5
# File 'lib/change_healthcare/xml_response.rb', line 3

def xml
  @xml
end