lib/soaspec/exchange.rb in soaspec-0.1.16 vs lib/soaspec/exchange.rb in soaspec-0.1.17

- old
+ new

@@ -233,10 +233,18 @@ @retry_for_success = @fail_factory ? false : true call self end + # @return [Hash] Hash representing the response of the API def to_hash exchange_handler.to_hash(response) end + # Wait until the passed block returns true + def until(&script) + Soaspec::Wait.until do + @response = nil # Reset response so it can be made repeatedly + instance_eval(&script) + end + end end \ No newline at end of file