lib/api-client/dispatcher.rb in api-client-2.0.0.rc1 vs lib/api-client/dispatcher.rb in api-client-2.0.0.rc2
- old
+ new
@@ -8,6 +8,17 @@
Typhoeus.send(method, *args)
else
NetHttp.send(method, *args)
end
end
-end
+
+ # Overwrite respond_to? default behavior
+ #
+ # @param [Symbol] method_name the name of the method.
+ # @param [Boolean] include_private if it does work to private methods as well.
+ # @return [Boolean] if it responds to the method or not.
+ def respond_to_missing?(method_name, include_private = false)
+ return true if Typhoeus.respond_to?(method_name)
+ return true if NetHttp.respond_to?(method_name)
+ super
+ end
+end
\ No newline at end of file