Class: Boomerang::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/boomerang/response.rb

Instance Method Summary collapse

Constructor Details

#initialize(body) ⇒ Response

Returns a new instance of Response.



3
4
5
# File 'lib/boomerang/response.rb', line 3

def initialize(body)
  @body = body
end

Instance Method Details

#parse(prefix, *elements) ⇒ Object



7
8
9
10
11
# File 'lib/boomerang/response.rb', line 7

def parse(prefix, *elements)
  xml = REXML::Document.new(@body)
  parse_and_fail_with_errors_if_any(xml)
  parse_response(xml, prefix, elements)
end