Class: Object

Inherits:
BasicObject
Defined in:
lib/method_finder.rb

Instance Method Summary collapse

Instance Method Details

#match_method(params, expected, &block) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/method_finder.rb', line 3

def match_method(params,expected, &block)
  with_warnings_suppressed do
    methods.select do |method|
      if method != "match_method"
        p = params
        p += ["&block"]  if block_given? && method[method.size-1,1] != '='
        test_method(method, p, expected, &block)
      end
    end.sort
  end
end