Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Gem::Specification#doc_dir

doc_dir(type = nil)

Returns the full path to this spec’s documentation directory. If type is given it will be appended to the end. For example:

Example
spec.doc_dir      # => "/path/to/gem_repo/doc/a-1"

spec.doc_dir 'ri' # => "/path/to/gem_repo/doc/a-1/ri"