Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/taskmapper-pivotal.rb

Overview

Monkey patch for backward compatibility issue with type cast on xml response

Class Method Summary collapse

Class Method Details

.from_xml(xml) ⇒ Object



8
9
10
11
# File 'lib/taskmapper-pivotal.rb', line 8

def from_xml(xml)
  scrubbed = scrub_attributes(xml)
  from_xml_original(scrubbed)
end

.from_xml_originalObject



6
# File 'lib/taskmapper-pivotal.rb', line 6

alias_method :from_xml_original, :from_xml

.scrub_attributes(xml) ⇒ Object



13
14
15
# File 'lib/taskmapper-pivotal.rb', line 13

def scrub_attributes(xml)
  xml.gsub(/<stories.*>/, "<stories type=\"array\">")
end