Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/buildmeister/core_ext.rb

Class Method Summary collapse

Class Method Details

.from_xml(xml) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/buildmeister/core_ext.rb', line 2

def self.from_xml(xml)
  xml_parsed = ActiveSupport::XmlMini.parse(xml)
  if xml_parsed["tickets"]
    xml_parsed["tickets"].delete "current_page"
    xml_parsed["tickets"].delete "total_pages"
  end
  typecast_xml_value(unrename_keys(xml_parsed))
end