Returns the absolute path of this instruction sequence.
nil
if the iseq was evaluated from a string.
For example, using ::compile_file
:
# /tmp/method.rb def hello puts "hello, world" end # in irb > iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb') > iseq.absolute_path #=> /tmp/method.rb
If the access mode is :row
or :col_or_row
, and each argument is either an Integer or a Range, returns rows. Otherwise, returns columns data.
In either case, the returned values are in the order specified by the arguments. Arguments may be repeated.
Returns rows as an Array of CSV::Row objects.
No argument:
source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n" table = CSV.parse(source, headers: true) table.values_at # => []
One index:
values = table.values_at(0) values # => [#<CSV::Row "Name":"foo" "Value":"0">]
Two indexes:
values = table.values_at(2, 0) values # => [#<CSV::Row "Name":"baz" "Value":"2">, #<CSV::Row "Name":"foo" "Value":"0">]
One Range:
values = table.values_at(1..2) values # => [#<CSV::Row "Name":"bar" "Value":"1">, #<CSV::Row "Name":"baz" "Value":"2">]
Ranges and indexes:
values = table.values_at(0..1, 1..2, 0, 2) pp values
Output:
[#<CSV::Row "Name":"foo" "Value":"0">, #<CSV::Row "Name":"bar" "Value":"1">, #<CSV::Row "Name":"bar" "Value":"1">, #<CSV::Row "Name":"baz" "Value":"2">, #<CSV::Row "Name":"foo" "Value":"0">, #<CSV::Row "Name":"baz" "Value":"2">]
Returns columns data as row Arrays, each consisting of the specified columns data for that row:
values = table.values_at('Name') values # => [["foo"], ["bar"], ["baz"]] values = table.values_at('Value', 'Name') values # => [["0", "foo"], ["1", "bar"], ["2", "baz"]]
Creates a Regexp
to match an address.
Returns the eigenvector matrix V
Returns the block diagonal eigenvalue matrix D
Adds an authenticator for Net::IMAP#authenticate
. auth_type
is the type of authentication this authenticator supports (for instance, “LOGIN”). The authenticator
is an object which defines a process() method to handle authentication with the server. See Net::IMAP::LoginAuthenticator
, Net::IMAP::CramMD5Authenticator
, and Net::IMAP::DigestMD5Authenticator
for examples.
If auth_type
refers to an existing authenticator, it will be replaced by the new one.
true if server advertises STARTTLS. You cannot get valid value before opening SMTP
session.
true if this object uses STARTTLS.
true if this object uses STARTTLS when server advertises STARTTLS.
Enables SMTP/TLS (STARTTLS) for this object. context
is a OpenSSL::SSL::SSLContext
object.
Disables SMTP/TLS (STARTTLS) for this object. Must be called before the connection is established to have any effect.
Private setter for the path of the URI::FTP
.