module RTurk # # # True # # 2 # 2 # 1 # # # GBHZVQX3EHXZ2AYDY2T0 # NYVZTQ1QVKJZXCYZCZVZ # 2009-04-22T00:17:32Z # Location # Select the image that best represents # Reviewable # 1 # # 5.00 # USD # $5.00 # # 2592000 # 2009-04-29T00:17:32Z # 30 # 0 # 0 # 1 # # # # ZZRZPTY4ERDZWJ868JCZ # NYVZTQ1QVKJZXCYZCZVZ # 2009-07-07T00:56:40Z # Location # Select the image that best represents # Assignable # 1 # # 5.00 # USD # $5.00 # # 2592000 # 2009-07-14T00:56:40Z # 30 # 0 # 1 # 0 # # class SearchHITsResponse < Response def hits @hits ||= begin @xml.xpath('//HIT').inject([]) do |arr, hit_xml| arr << HITParser.new(hit_xml); arr end end end # todo: merge with GetReviewableHITsResponse and GetAssignmentsForHITResponse # todo: test def total_num_results @xml.xpath('//TotalNumResults').inner_text.to_i end # todo: test def num_results @xml.xpath('//NumResults').inner_text.to_i end # todo: test def page_number @xml.xpath('//PageNumber').inner_text.to_i end end end