method
create_cache_for
Ruby latest stable (v2_5_5)
-
0 notes -
Class: Driver
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378 (0)
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
create_cache_for(klassname, path)
public
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