Returns the path of this instruction sequence.
<compiled>
if the iseq was evaluated from a string.
For example, using irb:
iseq = RubyVM::InstructionSequence.compile('num = 1 + 2') #=> <RubyVM::InstructionSequence:<compiled>@<compiled>> iseq.path #=> "<compiled>"
Using ::compile_file
:
# /tmp/method.rb def hello puts "hello, world" end # in irb > iseq = RubyVM::InstructionSequence.compile_file('/tmp/method.rb') > iseq.path #=> /tmp/method.rb
The platform this gem runs on.
This is usually Gem::Platform::RUBY or Gem::Platform::CURRENT.
Most gems contain pure Ruby code; they should simply leave the default value in place. Some gems contain C (or other) code to be compiled into a Ruby “extension”. The gem should leave the default value in place unless the code will only compile on a certain type of system. Some gems consist of pre-compiled code (“binary gems”). It’s especially important that they set the platform attribute appropriately. A shortcut is to set the platform to Gem::Platform::CURRENT, which will cause the gem builder to set the platform to the appropriate value for the system on which the build is being performed.
If this attribute is set to a non-default value, it will be included in the filename of the gem when it is built such as: nokogiri-1.6.0-x86-mingw32.gem
Usage:
spec.platform = Gem::Platform.local
Enumerate every known spec. See ::dirs=
and ::add_spec to set the list of specs.
Return a list of all outdated local gem names. This method is HEAVY as it must go fetch specifications from the server.
Use outdated_and_latest_version
if you wish to retrieve the latest remote version as well.
Activate this spec, registering it as a loaded spec and adding it’s lib paths to $LOAD_PATH. Returns true if the spec was activated, false if it was previously activated. Freaks out if there are conflicts upon activation.
Abbreviate the spec for downloading. Abbreviated specs are only used for searching, downloading and related activities and do not need deployment specific information (e.g. list of files). So we abbreviate the spec, making it much smaller for quicker downloads.
The date this gem was created.
If SOURCE_DATE_EPOCH is set as an environment variable, use that to support reproducible builds; otherwise, default to the current UTC date.
Details on SOURCE_DATE_EPOCH: reproducible-builds.org/specs/source-date-epoch/
The date this gem was created
DO NOT set this, it is set automatically when the gem is packaged.
Normalize the list of files so that:
All file lists have redundancies removed.
Files referenced in the extra_rdoc_files
are included in the package file list.
The platform this gem runs on. See Gem::Platform
for details.
A short summary of this gem’s description.
Checks that the specification contains all required fields, and does a very basic sanity check.
Raises InvalidSpecificationException if the spec does not pass the checks..
Store session data on the server. For some session storage types, this is a no-op.
Yields each pair of the row as header and field tuples (much like iterating over a Hash
). This method returns the row for chaining.
If no block is given, an Enumerator
is returned.
Support for Enumerable
.
In the default mixed mode or row mode, iteration is the standard row major walking of rows. In column mode, iteration will yield
two element tuples containing the column name and an Array
of values for that column.
This method returns the table for chaining.
If no block is given, an Enumerator
is returned.
Changes the (remote) directory.
Returns the status (STAT command).
when stat is invoked with pathname as a parameter it acts like list but a lot faster and over the same tcp session.
Sends an AUTHENTICATE command to authenticate the client. The auth_type
parameter is a string that represents the authentication mechanism to be used. Currently Net::IMAP
supports the authentication mechanisms:
LOGIN:: login using cleartext user and password. CRAM-MD5:: login with cleartext user and encrypted password (see [RFC-2195] for a full description). This mechanism requires that the server have the user's password stored in clear-text password.
For both of these mechanisms, there should be two args
: username and (cleartext) password. A server may not support one or the other of these mechanisms; check capability()
for a capability of the form “AUTH=LOGIN” or “AUTH=CRAM-MD5”.
Authentication is done using the appropriate authenticator object: see @@authenticators for more information on plugging in your own authenticator.
For example:
imap.authenticate('LOGIN', user, password)
A Net::IMAP::NoResponseError
is raised if authentication fails.
Sends a CREATE command to create a new mailbox
.
A Net::IMAP::NoResponseError
is raised if a mailbox with that name cannot be created.
Sends a STATUS command, and returns the status of the indicated mailbox
. attr
is a list of one or more attributes whose statuses are to be requested. Supported attributes include:
MESSAGES:: the number of messages in the mailbox. RECENT:: the number of recent messages in the mailbox. UNSEEN:: the number of unseen messages in the mailbox.
The return value is a hash of attributes. For example:
p imap.status("inbox", ["MESSAGES", "RECENT"]) #=> {"RECENT"=>0, "MESSAGES"=>44}
A Net::IMAP::NoResponseError
is raised if status values for mailbox
cannot be returned; for instance, because it does not exist.
Sends a CHECK command to request a checkpoint of the currently selected mailbox. This performs implementation-specific housekeeping; for instance, reconciling the mailbox’s in-memory and on-disk state.