Flowdock
method

run

Importance_0
run() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rdoc/ri/driver.rb, line 584
  def run
    if(@list_doc_dirs)
      puts @doc_dirs.join("\n")
    elsif @names.empty? then
      @display.list_known_classes class_cache.keys.sort
    else
      @names.each do |name|
        if class_cache.key? name then
          method_map = display_class name
          if(@interactive)
            method_name = @display.get_class_method_choice(method_map)

            if(method_name != nil)
              method = lookup_method "#{name}#{method_name}", name
              display_method method
            end
          end
        elsif name =~ /::|\#|\./ then
          klass, = parse_name name

          orig_klass = klass
          orig_name = name

          loop do
            method = lookup_method name, klass

            break method if method

            ancestor = lookup_ancestor klass, orig_klass

            break unless ancestor

            name = name.sub klass, ancestor
            klass = ancestor
          end

          raise NotFoundError, orig_name unless method

          display_method method
        else
          methods = select_methods(/#{name}/)

          if methods.size == 0
            raise NotFoundError, name
          elsif methods.size == 1
            display_method methods[0]
          else
            if(@interactive)
              @display.display_method_list_choice methods
            else
              @display.display_method_list methods
            end
          end
        end
      end
    end
  rescue NotFoundError => e
    abort e.message
  end
Register or log in to add new notes.