Class: Resourceful::Resource::Xml

Inherits:
Format
  • Object
show all
Defined in:
lib/resourceful/resource/format.rb

Constant Summary

Constants inherited from Format

Format::SUPPORTED

Class Method Summary collapse

Methods inherited from Format

get, json, xml

Class Method Details

.build(xml_str) ⇒ Object



78
79
80
81
82
# File 'lib/resourceful/resource/format.rb', line 78

def build(xml_str)
  parsable?(xml_str) do
    Nokogiri::XML(xml_str.to_s)
  end
end

.to_sObject



74
75
76
# File 'lib/resourceful/resource/format.rb', line 74

def to_s
  "xml"
end