Module: Deltacloud::Client::Helpers::XmlHelper
- Included in:
- Base
- Defined in:
- lib/deltacloud/client/helpers/xml_helper.rb
Instance Method Summary collapse
-
#extract_xml_body(obj) ⇒ Object
Extract XML string from the various objects.
Instance Method Details
#extract_xml_body(obj) ⇒ Object
Extract XML string from the various objects
22 23 24 25 26 27 28 29 |
# File 'lib/deltacloud/client/helpers/xml_helper.rb', line 22 def extract_xml_body(obj) case obj when Faraday::Response then obj.body when Nokogiri::XML::Element then obj.to_s when Nokogiri::XML::Document then obj.to_s else obj end end |