Class Relax::Response
In: lib/relax/response.rb
Parent: Object

Response is intended to be a parent class for responses passed to Service#call.

A response is in essence an object used to facilitate XML parsing. It stores an XML document, and provides access to it through methods like element and attribute.

Methods

===   attribute   date_value   element   elements   float_value   has?   inherited   integer_value   is?   new   parameter   root   text_value   time_value   value  

Attributes

raw  [RW] 
xml  [RW] 

Public Class methods

When a Response is extended, the superclass‘s parameters are copied into the new class. This behavior has the following side-effect: if parameters are added to the superclass after it has been extended, those new paramters won‘t be passed on to its children. This shouldn‘t be a problem in most cases.

New takes in the XML from the response. For the initial response, this will be the root element, but child elements may also be passed into Response objects.

This will raise a MissingParameter error if a parameterd marked as required is not present in the XML response.

Specifes a parameter that will be automatically parsed when the Response is instantiated.

Options:

Public Instance methods

Returns an element of the specified name.

Returns a set of elements matching name.

has?(name)

Alias for element

Gets an integer value.

Checks the name of the root node.

Returns the root of the XML document.

[Validate]