Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more
Object
Generates ri data files
Description of this generator
Build the initial indices and output objects based on an array of TopLevel objects containing the extracted information.
# File rdoc/generator/ri.rb, line 33
def generate top_levels
install_siginfo_handler
@store.load_cache
RDoc::TopLevel.all_classes_and_modules.each do |klass|
@current = "#{klass.class}: #{klass.full_name}"
@store.save_class klass
klass.each_method do |method|
@current = "#{method.class}: #{method.full_name}"
@store.save_method klass, method
end
klass.each_attribute do |attribute|
@store.save_method klass, attribute
end
end
@current = 'saving cache'
@store.save_cache
ensure
@current = nil
remove_siginfo_handler
end
Set up a new ri generator
# File rdoc/generator/ri.rb, line 19
def initialize options #:not-new:
@options = options
@old_siginfo = nil
@current = nil
@store = RDoc::RI::Store.new '.'
@store.dry_run = @options.dry_run
@store.encoding = @options.encoding if @options.respond_to? :encoding
end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.