class RDoc::RubygemsHook

Attributes

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

Public Class Methods

default_gem?() click to toggle source
# File rdoc/rubygems_hook.rb, line 276
def self.default_gem?
  !File.exist?(File.join(__dir__, "..", "rubygems_plugin.rb"))
end
generation_hook(installer, specs) click to toggle source
# File rdoc/rubygems_hook.rb, line 306
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
new(spec, generate_rdoc = false, generate_ri = true) click to toggle source
# File rdoc/rubygems_hook.rb, line 280
def initialize(spec, generate_rdoc = false, generate_ri = true)
  @spec = spec
  @generate_rdoc = generate_rdoc
  @generate_ri   = generate_ri
  @force = false
end

Public Instance Methods

generate() click to toggle source
# File rdoc/rubygems_hook.rb, line 287
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
remove() click to toggle source
# File rdoc/rubygems_hook.rb, line 297
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