Looks up all hostnames for address
.
Looks up the hostname of address
.
Looks up all hostnames for address
.
Returns the full path name of the temporary file. This will be nil if unlink
has been called.
show the name of the thread.
set given name to the ruby thread. On some platform, it may set the name to pthread and/or kernel.
Returns the parameter information of this proc.
prc = lambda{|x, y=42, *other|} prc.parameters #=> [[:req, :x], [:opt, :y], [:rest, :other]]
Returns the name of the method.
Returns the parameter information of this method.
def foo(bar); end method(:foo).parameters #=> [[:req, :bar]] def foo(bar, baz, bat, &blk); end method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:req, :bat], [:block, :blk]] def foo(bar, *args); end method(:foo).parameters #=> [[:req, :bar], [:rest, :args]] def foo(bar, baz, *args, &blk); end method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:rest, :args], [:block, :blk]]
Returns the name of the method.
Returns the parameter information of this method.
def foo(bar); end method(:foo).parameters #=> [[:req, :bar]] def foo(bar, baz, bat, &blk); end method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:req, :bat], [:block, :blk]] def foo(bar, *args); end method(:foo).parameters #=> [[:req, :bar], [:rest, :args]] def foo(bar, baz, *args, &blk); end method(:foo).parameters #=> [[:req, :bar], [:req, :baz], [:rest, :args], [:block, :blk]]
Path of the file being run
Returns the system information obtained by uname system call.
The return value is a hash which has 5 keys at least:
:sysname, :nodename, :release, :version, :machine
Example:
require 'etc' require 'pp' pp Etc.uname #=> {:sysname=>"Linux", # :nodename=>"boron", # :release=>"2.6.18-6-xen-686", # :version=>"#1 SMP Thu Nov 5 19:54:42 UTC 2009", # :machine=>"i686"}
Retrieve the PathSupport
object that RubyGems uses to lookup files.
Initialize the filesystem paths to use from env
. env
is a hash-like object (typically ENV
) that is queried for ‘GEM_HOME’, ‘GEM_PATH’, and ‘GEM_SPEC_CACHE’ Keys for the env
hash should be Strings, and values of the hash should be Strings or nil
.
Convert signal number to signal name. Returns nil
if the signo is an invalid signal number.
Signal.trap("INT") { |signo| puts Signal.signame(signo) } Process.kill("INT", 0)
produces:
INT
Returns the namespace URL, if defined, or nil otherwise
e = Element.new("el") e.add_namespace("ns", "http://url") e.add_attribute("ns:a", "b") e.add_attribute("nsx:a", "c") e.attribute("ns:a").namespace # => "http://url" e.attribute("nsx:a").namespace # => nil
Evaluates to the URI
for a prefix, or the empty string if no such namespace is declared for this element. Evaluates recursively for ancestors. Returns the default namespace, if there is one.
the prefix to search for. If not supplied, returns the default namespace if one exists
the namespace URI
as a String, or nil if no such namespace exists. If the namespace is undefined, returns an empty string
doc = Document.new("<a xmlns='1' xmlns:y='2'><b/><c xmlns:z='3'/></a>") b = doc.elements['//b'] b.namespace # -> '1' b.namespace("y") # -> '2'