Sha256: e2cb25ba5d0c55311803e148af0f5d130158726b6c3e4436b2a4fafc1a2bbc53
Contents?: true
Size: 376 Bytes
Versions: 1
Compression:
Stored size: 376 Bytes
Contents
module RTurk class Answer def self.parse(xml) answer = XmlSimple.xml_in(xml, {'ForceArray' => false}) response = {} answer['Answer'].each do |a| question = a['QuestionIdentifier'] a.delete('QuestionIdentifier') a.each_value do |v| response[question] = v end end response end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
markpercival-rturk-1.0.3 | lib/rturk/answer.rb |