Object
# File lib/fastri/ri_index.rb, line 74 def initialize(ri_index, fullname, index, source_index) # index is the index in ri_index' array # source_index either nil (all scopes) or the integer referencing the # path (-> we'll do @ri_index.paths[@source_index]) @ri_index = ri_index @full_name = fullname @name = fullname[/[.#](.*)$/, 1] @index = index @source_index = source_index end
# File lib/fastri/ri_index.rb, line 112 def instance_method? !singleton_method? end
Returns the “fully resolved” file name of the yaml containing our description.
# File lib/fastri/ri_index.rb, line 87 def path_name prefix = @full_name.split(/::|[#.]/)[0..-2] case @source_index when nil ## we'd like to do #@ri_index.source_paths_for(self).map do |path| # File.join(File.join(path, *prefix), RI::RiWriter.internal_to_external(@name)) #end # but RI doesn't support merging at the method-level, so path = @ri_index.source_paths_for(self).first File.join(File.join(path, *prefix), RI::RiWriter.internal_to_external(@name) + (singleton_method? ? "-c" : "-i" ) + ".yaml") else path = @ri_index.paths[@source_index] File.join(File.join(path, *prefix), RI::RiWriter.internal_to_external(@name) + (singleton_method? ? "-c" : "-i" ) + ".yaml") end end
Generated with the Darkfish Rdoc Generator 2.