search for: saved_result

Displaying 1 result from an estimated 1 matches for "saved_result".

2007 Aug 12
5
stubbing a method that yeilds sequential results
...ame again if the next result is sufficiently similar). I only want to yeild merged results and results that are not similar to their preceeding result(s) - I''d imagined he code to do this would be something along the lines of: class Intermediate def self.results(attributes) @saved_result = nil Connector.each_result(attributes) do |result| if results_match(result, @saved_result) @saved_result.merge!(result) else yield @saved_result unless @saved_result.nil? @saved_result = result end end yield @saved_result unless @save...