Method: MethodFound::Interceptor::Matcher#match
- Defined in:
- lib/method_found/interceptor.rb
#match(method_name, context) ⇒ Object
73 74 75 76 77 78 79 80 81 |
# File 'lib/method_found/interceptor.rb', line 73 def match(method_name, context) if matcher.is_a?(Regexp) matcher.match(method_name) elsif matcher.respond_to?(:call) context.instance_exec(method_name, &matcher) else (matcher.to_sym == method_name) end end |