Flowdock
method

create_cache_for

Importance_0
v1_9_1_378 - Show latest stable - 0 notes - Class: Driver
create_cache_for(klassname, path) 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 475
  def create_cache_for(klassname, path)
    klass = class_cache[klassname]
    return nil unless klass

    method_files = klass["sources"]
    cache = OpenStructHash.new

    method_files.each do |f|
      system_file = f.index(@sys_dir) == 0
      Dir[File.join(File.dirname(f), "*")].each do |yaml|
        next unless yaml =~ /yaml$/
        next if yaml =~ /cdesc-[^\/]+yaml$/

        method = read_yaml yaml

        if system_file then
          method["source_path"] = "Ruby #{RDoc::RI::Paths::VERSION}"
        else
          if(f =~ %gems/[\d.]+/doc/([^/]+)%) then
            ext_path = "gem #{$1}"
          else
            ext_path = f
          end

          method["source_path"] = ext_path
        end

        name = method["full_name"]
        cache[name] = method
      end
    end

    write_cache cache, path
  end
Register or log in to add new notes.