Object
# File lib/fastri/ri_service.rb, line 74 def self.new ret = super yield ret if block_given? ret end
# File lib/fastri/ri_service.rb, line 80 def initialize @matchers = {} end
# File lib/fastri/ri_service.rb, line 84 def add_matcher(name, &block) @matchers[name] = block end
# 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
# 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
[Validate]
Generated with the Darkfish Rdoc Generator 2.