tcp

Socket.tcp(host, port, local_host=nil, local_port=nil, [opts]) {|socket| ... }Socket.tcp(host, port, local_host=nil, local_port=nil, [opts]) Class Public methods creates a new socket object connected to host:port using TCP/IP. If local_host:local_port is given, the socket is bound to it. The optional last argument opts is options represented by a hash. opts may have following options: :connect_timeout specify the timeout in seconds. If a block is given, the block is called wi

each_pair

struct.each_pair {|sym, obj| block } â structstruct.each_pair â an_enumerator Instance Public methods Calls block once for each instance variable, passing the name (as a symbol) and the value as parameters. If no block is given, an enumerator is returned instead. 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 =>

focus

focus() Instance Public methods

trace_vinfo_for_element

trace_vinfo_for_element(elem) Instance Public methods Alias for: trace_info_for_element

length

length() Instance Public methods

localtime

time.localtime â timetime.localtime(utc_offset) â time Instance Public methods Converts time to local time (using the local time zone in effect for this process) modifying the receiver. If utc_offset is given, it is used instead of the local time. t = Time.utc(2000, "jan", 1, 20, 15, 1) #=> 2000-01-01 20:15:01 UTC t.utc? #=> true t.localtime #=> 2000-01-01 14:15:01 -0600 t.utc?

rakefile_location

rakefile_location(backtrace=caller) Instance Public methods

singular_name

singular_name() Instance Protected methods FIXME: We are avoiding to use alias because a bug on thor that make this method public and add it to the task list.

package_version 2

package_version() Class Public methods

values_at

ENV.values_at(name, ...) â Array Class Public methods Returns an array containing the environment variable values associated with the given names. See also ::select.