class FastRI::RiService::MatchFinder
Public Class Methods
Source
# File lib/fastri/ri_service.rb, line 74 def self.new ret = super yield ret if block_given? ret end
Calls superclass method
Public Instance Methods
Source
# File lib/fastri/ri_service.rb, line 84 def add_matcher(name, &block) @matchers[name] = block end
Source
# File lib/fastri/ri_service.rb, line 88 def get_matches(methods) catch(:MatchFinder_return) do methods.each do |name| matcher = @matchers[name] matcher.call(self) if matcher end [] end end
Source
# File lib/fastri/ri_service.rb, line 98 def yield(matches) case matches when nil, []; nil when Array throw :MatchFinder_return, matches else throw :MatchFinder_return, [matches] end end