class RDoc::RubygemsHook - Documentation for Ruby 3.4
Description: Documentation for the RDoc::RubygemsHook class
Keywords: ruby,class,RDoc::RubygemsHook

# class RDoc::RubygemsHook

### Attributes

force [RW]
generate_rdoc [RW]
generate_ri [RW]

### Public Class Methods

default_gem? ()
Source

    # File lib/rdoc/rubygems_hook.rb, line 273
    def self.default_gem?
      !File.exist?(File.join(__dir__, "..", "rubygems_plugin.rb"))
    end

generation_hook (installer, specs)
Source

    # File lib/rdoc/rubygems_hook.rb, line 303
    def self.generation_hook(installer, specs)
      # Do nothing if this is NOT a default gem.
      return unless default_gem?

      # Generate document for compatibility if this is a default gem.
      RubyGemsHook.generate(installer, specs)
    end

load_rdoc ()
Source

    # File lib/rdoc/rubygems_hook.rb, line 311
    def self.load_rdoc
      RubyGemsHook.load_rdoc
    end

new (spec, generate_rdoc = false, generate_ri = true)
Source

    # File lib/rdoc/rubygems_hook.rb, line 277
    def initialize(spec, generate_rdoc = false, generate_ri = true)
      @spec = spec
      @generate_rdoc = generate_rdoc
      @generate_ri   = generate_ri
      @force = false
    end

rdoc_version ()
Source

    # File lib/rdoc/rubygems_hook.rb, line 315
    def self.rdoc_version
      RubyGemsHook.rdoc_version
    end

### Public Instance Methods

generate ()
Source

    # File lib/rdoc/rubygems_hook.rb, line 284
    def generate
      # Do nothing if this is NOT a default gem.
      return unless self.class.default_gem?

      # Generate document for compatibility if this is a default gem.
      hook = RubyGemsHook.new(@spec, @generate_rdoc, @generate_ri)
      hook.force = @force
      hook.generate
    end

rdoc_installed? ()
Source

    # File lib/rdoc/rubygems_hook.rb, line 319
    def rdoc_installed?
      RubyGemsHook.new(@spec).rdoc_installed?
    end

remove ()
Source

    # File lib/rdoc/rubygems_hook.rb, line 294
    def remove
      # Do nothing if this is NOT a default gem.
      return unless self.class.default_gem?

      # Remove generated document for compatibility if this is a
      # default gem.
      RubyGemsHook.new(@spec).remove
    end

ri_installed? ()
Source

    # File lib/rdoc/rubygems_hook.rb, line 323
    def ri_installed?
      RubyGemsHook.new(@spec).ri_installed?
    end