lib/yardcheck/proxy.rb in yardcheck-0.0.2 vs lib/yardcheck/proxy.rb in yardcheck-0.0.3

- old
+ new

@@ -9,25 +9,32 @@ undef_method :== undef_method :!= undef_method :! def method_missing(method_name, *args, &block) - if target_respond_to?(method_name) + if respond_to_missing?(method_name, true) @target.__send__(method_name, *args, &block) else ::Object .instance_method(method_name) .bind(@target) .call(*args, &block) end end - private - - def target_respond_to?(method_name) + def respond_to_missing?(method_name, include_all = false) ::Object .instance_method(:respond_to?) .bind(@target) - .call(method_name, true) + .call(method_name, include_all) + end + + private + + def object_dispatch(receiver, method_name, *params) + ::Object + .instance_method(method_name) + .bind(receiver) + .call(*params) end end # Proxy end # Yardcheck