lib/resourcelogic/response_collector.rb in resourcelogic-0.11.0 vs lib/resourcelogic/response_collector.rb in resourcelogic-0.12.0

- old
+ new

@@ -8,11 +8,16 @@ def initialize @responses = [] end def method_missing(method_name, &block) - @responses.delete self[method_name] - @responses << [method_name, block || nil] + existing = self[method_name] + if existing + existing[0] = method_name + existing[1] = block || nil + else + @responses << [method_name, block || nil] + end end def [](symbol) @responses.find { |method, block| method == symbol } end \ No newline at end of file