This is not ideomatic ruby.  How about `response.each do |result_parts|`