lib/soaspec/exchange.rb in soaspec-0.0.48 vs lib/soaspec/exchange.rb in soaspec-0.0.49
- old
+ new
@@ -26,9 +26,15 @@
@test_name = name.to_s
@api_class = Soaspec.api_handler # This uses the global parameter. The handler should be set straight before an exchange is made
@override_parameters = override_parameters
@retry_for_success = false
self.retry_count = 3
+ puts 'ELE ' + @api_class.elements.to_s
+ @api_class.elements.each do |element|
+ define_singleton_method(element) do
+ @api_class.__send__(element, response)
+ end
+ end
end
# Make request to handler with parameters defined
# Will retry until success code reached if retry_for_success? is set
# @return [Response] Response from Api handler
\ No newline at end of file