lib/method_matching.rb in pat-maddox-method_matching-0.1.1 vs lib/method_matching.rb in pat-maddox-method_matching-0.1.2
- old
+ new
@@ -26,9 +26,15 @@
method_matchers.each { |m, mdef| try_matcher.call(m, mdef) }
self.class.method_matchers.each { |m, mdef| try_matcher.call(m, mdef) }
super
end
+
+ def respond_to?(method_name)
+ (method_matchers.keys +
+ self.class.method_matchers.keys).each do |matcher|
+ return true if method_name.to_s =~ matcher
+ end
+ super
+ end
end
end
-
-#Module.send :include, MethodMatching