Returns the full path to the cache directory containing this spec’s cached gem.
Returns the full path to the base gem directory.
eg: /usr/local/lib/ruby/gems/1.8
Returns full path to the directory where gem’s extensions are installed.
Returns path to the extensions directory.
Returns the full path to this spec’s gem directory. eg: /usr/local/lib/ruby/1.8/gems/mygem-1.0
Returns the full path to the gems directory containing this spec’s gem directory. eg: /usr/local/lib/ruby/1.8/gems
Lazy accessor for the spec’s gem directory.
Returns the full path to installed gem’s bin directory.
NOTE: do not confuse this with bindir
, which is just ‘bin’, not a full path.
Returns the full path to this spec’s documentation directory. If type
is given it will be appended to the end. For example:
spec.doc_dir # => "/path/to/gem_repo/doc/a-1" spec.doc_dir 'ri' # => "/path/to/gem_repo/doc/a-1/ri"
Returns the full path to this spec’s ri directory.
Returns the full path to the directory containing this spec’s gemspec file. eg: /usr/local/lib/ruby/gems/1.8/specifications
Returns a Gem::Security::TrustDir
which wraps the directory where trusted certificates live.
Returns the path parameter passed to dir’s constructor.
d = Dir.new("..") d.path #=> ".."
Default spec directory path to be used if an alternate value is not specified in the environment
Returns binary extensions dir for specified RubyGems base dir or nil if such directory cannot be determined.
By default, the binary extensions are located side by side with their Ruby counterparts, therefore nil is returned
Returns the full path to the build info directory
Globs for files matching pattern
inside of directory
, returning absolute paths to the matching files.
An Encoding instance represents a character encoding usable in Ruby. It is defined as a constant under the Encoding namespace. It has a name and, optionally, aliases:
Encoding::US_ASCII.name # => "US-ASCII" Encoding::US_ASCII.names # => ["US-ASCII", "ASCII", "ANSI_X3.4-1968", "646"]
A Ruby method that accepts an encoding as an argument will accept:
An Encoding object.
The name of an encoding.
An alias for an encoding name.
These are equivalent:
'foo'.encode(Encoding::US_ASCII) # Encoding object. 'foo'.encode('US-ASCII') # Encoding name. 'foo'.encode('ASCII') # Encoding alias.
For a full discussion of encodings and their uses, see the Encodings document.
Encoding::ASCII_8BIT is a special-purpose encoding that is usually used for a string of bytes, not a string of characters. But as the name indicates, its characters in the ASCII range are considered as ASCII characters. This is useful when you use other ASCII-compatible encodings.
EncodingError
is the base class for encoding errors.