Class: Goodall::Handler::Xml

Inherits:
Base
  • Object
show all
Defined in:
lib/goodall/handler/xml.rb

Instance Method Summary collapse

Instance Method Details

#parse_payload(payload) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/goodall/handler/xml.rb', line 11

def parse_payload(payload)
  if payload.class == String
    # assue it's a string of xml
    return payload
  else
    begin
      return payload.to_xml
    rescue Exception => e
      puts "!!! Just tried to call to_xml on your response, but an error was returned. Your object may not support this."
      raise e
    end
  end
end