Get the indentation level.
Set
the indentation level to level
. The level must be less than 10 and greater than 1.
Returns the exit status of the child for which PTY#check raised this exception
The line number of the current token. This value starts from 1. This method is valid only in event handlers.
The scanner’s state of the current token. This value is the bitwise OR of zero or more of the Ripper::EXPR_*
constants.
returns a string which shows ancillarydata in human-readable form.
p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").inspect #=> "#<Socket::AncillaryData: INET6 IPV6 PKTINFO \"\">"
Creates a new Socket::AncillaryData
object which contains a int as data.
The size and endian is dependent on the host.
require 'socket' p Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno) #=> #<Socket::AncillaryData: UNIX SOCKET RIGHTS 2>
Returns the data in ancillarydata as an int.
The size and endian is dependent on the host.
ancdata = Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno) p ancdata.int #=> 2
returns the timestamp as a time object.
ancillarydata should be one of following type:
SOL_SOCKET/SCM_TIMESTAMP (microsecond) GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X
SOL_SOCKET/SCM_TIMESTAMPNS (nanosecond) GNU/Linux
SOL_SOCKET/SCM_BINTIME (2**(-64) second) FreeBSD
Addrinfo.udp
(“127.0.0.1”, 0).bind {|s1|
Addrinfo.udp("127.0.0.1", 0).bind {|s2| s1.setsockopt(:SOCKET, :TIMESTAMP, true) s2.send "a", 0, s1.local_address ctl = s1.recvmsg.last p ctl #=> #<Socket::AncillaryData: INET SOCKET TIMESTAMP 2009-02-24 17:35:46.775581> t = ctl.timestamp p t #=> 2009-02-24 17:35:46 +0900 p t.usec #=> 775581 p t.nsec #=> 775581000 }
}
Returns a string to show contents of ifaddr.
Returns the interface index of ifaddr.
Returns the destination address of ifaddr. nil is returned if the flags doesn’t have IFF_POINTOPOINT.
Returns a string which shows sockopt in human-readable form.
p Socket::Option.new(:INET, :SOCKET, :KEEPALIVE, [1].pack("i")).inspect #=> "#<Socket::Option: INET SOCKET KEEPALIVE 1>"
Creates a new Socket::Option
object which contains an int as data.
The size and endian is dependent on the platform.
p Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 1) #=> #<Socket::Option: INET SOCKET KEEPALIVE 1>
Returns the data in sockopt as an int.
The size and endian is dependent on the platform.
sockopt = Socket::Option.int(:INET, :SOCKET, :KEEPALIVE, 1) p sockopt.int => 1
Logs a message
at the info (syslog info) log level, or logs the message returned from the block.
Write data to a registry value named name. When name is nil, write to the ‘default’ value.
type is type value. (see Registry::Constants
module) Class
of data must be same as which read
method returns.
Write value to a registry value named name.
The value type is REG_SZ(write_s
), REG_DWORD(write_i
), or REG_BINARY(write_bin
).
Write value to a registry value named name.
The value type is REG_SZ(write_s
), REG_DWORD(write_i
), or REG_BINARY(write_bin
).
Returns key information as Array
of: :num_keys
The number of subkeys.
:max_key_length
Maximum length of name of subkeys.
:num_values
The number of values.
:max_value_name_length
Maximum length of name of values.
:max_value_length
Maximum length of value of values.
:descriptor_length
Length of security descriptor.
:wtime
Last write time as FILETIME(64-bit integer)
For detail, see RegQueryInfoKey Win32
API
.
Returns the method name with class name.
Returns true if the parameter is input.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbook') method = WIN32OLE_METHOD.new(tobj, 'SaveAs') param1 = method.params[0] puts param1.input? # => true
Returns the parameter name with class name. If the parameter has default value, then returns name=value string with class name.