Returns true
if the named file is a directory, or a symlink that points at a directory, and false
otherwise.
file_name can be an IO
object.
File.directory?(".")
Creates a remote directory.
Removes a remote directory.
The path to the data directory for this gem.
Return the directories that Specification
uses to find specs.
Set
the directories that Specification
uses to find specs. Setting this resets the list of known specs.
Same as Dir.mkdir
, except multiple directories are allowed.
Same as Dir.rmdir
, except multiple directories are allowed.
Is code
a redirection status?
Is code
a redirection status?
Quietly ensure the Gem directory dir
contains all the proper subdirectories. If we can’t create a directory due to a permission problem, then we will silently continue.
If mode
is given, missing directories are created with this mode.
World-writable directories will never be created.
Paths where RubyGems’ .rb files and bin files are installed
Calls the block once for each [key, value] pair in the database. Returns self.
Yields the name and value of each struct member in order. If no block is given an enumerator is returned.
Customer = Struct.new(:name, :address, :zip) joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345) joe.each_pair {|name, value| puts("#{name} => #{value}") }
Produces:
name => Joe Smith address => 123 Maple, Anytown NC zip => 12345
Executes block for each key in the database, passing the key and the corresponding value as a parameter.
Iterates over each key-value pair in the database.
If no block is given, returns an Enumerator
.
Calls block once for each key in hsh, passing the key-value pair as parameters.
If no block is given, an enumerator is returned instead.
h = { "a" => 100, "b" => 200 } h.each {|key, value| puts "#{key} is #{value}" }
produces:
a is 100 b is 200
Yields each environment variable name
and value
.
If no block is given an Enumerator
is returned.
Returns an array with bindir attached to each executable in the executables
list
creates a temporary directory with hax TODO: deprecate and remove
Redirects to url
with a WEBrick::HTTPStatus::Redirect
status
.
Example:
res.set_redirect WEBrick::HTTPStatus::TemporaryRedirect