Returns true if this source list includes other
which may be a Gem::Source
or a source URI
.
Returns a Gem::StubSpecification
for every installed gem
A detailed description of this gem. See also summary
Recursively walk dependencies of this spec, executing the block
for each hop.
Finds the path to the Ruby executable
Prints a formatted backtrace to the errors stream if backtraces are enabled.
See IO.unlink when path
is a file.
See Dir.unlink
when path
is a directory.
Tests if the given command
exists in file1
, or optionally file2
.
Example:
sh[?e, "foo"] sh[:e, "foo"] sh["e", "foo"] sh[:exists?, "foo"] sh["exists?", "foo"]
Executes the given command
with the options
parameter.
Example:
print sh.system("ls", "-l") sh.system("ls", "-l") | sh.head > STDOUT
Executes a block as self
Example:
sh.transact { system("ls", "-l") | head > STDOUT }
v
String
public setter for the host component v
. (with validation)
see also URI::Generic.check_host
require 'uri' uri = URI.parse("http://my.example.com") uri.host = "foo.com" # => "foo.com" uri #=> #<URI::HTTP:0x000000008e89e8 URL:http://foo.com>
extract the host part of the URI
and unwrap brackets for IPv6 addresses.
This method is same as URI::Generic#host
except brackets for IPv6 (and future IP) addresses are removed.
u = URI("http://[::1]/bar") p u.hostname #=> "::1" p u.host #=> "[::1]"
set the host part of the URI
as the argument with brackets for IPv6 addresses.
This method is same as URI::Generic#host=
except the argument can be bare IPv6 address.
u = URI("http://foo/bar") p u.to_s #=> "http://foo/bar" u.hostname = "::1" p u.to_s #=> "http://[::1]/bar"
If the argument seems IPv6 address, it is wrapped by brackets.