Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. 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"