Results for: "Dir.chdir"

No documentation available

Iterates over the elements of the first enumerable by calling the “each” method on it with the given arguments, then proceeds to the following enumerables in sequence until all of the enumerables are exhausted.

If no block is given, returns an enumerator.

No documentation available

For a block.

Receive the section and its pairs for the current configuration.

config.each do |section, key, value|
  # ...
end
No documentation available
No documentation available
No documentation available

See Zlib::GzipReader documentation for a description.

See Zlib::GzipReader documentation for a description.

Returns true if the file is a character device, false if it isn’t or if the operating system doesn’t support this feature.

File.stat("/dev/tty").chardev?   #=> true

Iterates over keys and objects in a weakly referenced object

Enumerate every known spec. See ::dirs= and ::add_spec to set the list of specs.

Does this dependency match the specification described by name and version or match spec?

NOTE: Unlike matches_spec? this method does not return true when the version is a prerelease version unless this is a prerelease dependency.

No documentation available

Sends a PATCH request to the path and gets a response, as an HTTPResponse object.

Sends a PROPPATCH request to the path and gets a response, as an HTTPResponse object.

No documentation available

This method will fetch the field value by header. It has the same behavior as Hash#fetch: if there is a field with the given header, its value is returned. Otherwise, if a block is given, it is yielded the header and its result is returned; if a default is given as the second argument, it is returned; otherwise a KeyError is raised.

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.

Matches addr against this entry.

Matches addr against each ACLEntry in this list.

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.

Sends a SEARCH command to search the mailbox for messages that match the given searching criteria, and returns message sequence numbers. keys can either be a string holding the entire search string, or a single-dimension array of search keywords and arguments. The following are some common search criteria; see [IMAP] section 6.4.4 for a full list.

<message set>

a set of message sequence numbers. ‘,’ indicates an interval, ‘:’ indicates a range. For instance, ‘2,10:12,15’ means “2,10,11,12,15”.

BEFORE <date>

messages with an internal date strictly before <date>. The date argument has a format similar to 8-Aug-2002.

BODY <string>

messages that contain <string> within their body.

CC <string>

messages containing <string> in their CC field.

FROM <string>

messages that contain <string> in their FROM field.

NEW

messages with the Recent, but not the Seen, flag set.

NOT <search-key>

negate the following search key.

OR <search-key> <search-key>

“or” two search keys together.

ON <date>

messages with an internal date exactly equal to <date>, which has a format similar to 8-Aug-2002.

SINCE <date>

messages with an internal date on or after <date>.

SUBJECT <string>

messages with <string> in their subject.

TO <string>

messages with <string> in their TO field.

For example:

p imap.search(["SUBJECT", "hello", "NOT", "NEW"])
#=> [1, 6, 7, 8]

Sends a FETCH command to retrieve data associated with a message in the mailbox.

The set parameter is a number or a range between two numbers, or an array of those. The number is a message sequence number, where -1 represents a ‘*’ for use in range notation like 100..-1 being interpreted as ‘100:*’. Beware that the exclude_end? property of a Range object is ignored, and the contents of a range are independent of the order of the range endpoints as per the protocol specification, so 1…5, 5..1 and 5…1 are all equivalent to 1..5.

attr is a list of attributes to fetch; see the documentation for Net::IMAP::FetchData for a list of valid attributes.

The return value is an array of Net::IMAP::FetchData or nil (instead of an empty array) if there is no matching message.

For example:

p imap.fetch(6..8, "UID")
#=> [#<Net::IMAP::FetchData seqno=6, attr={"UID"=>98}>, \\
     #<Net::IMAP::FetchData seqno=7, attr={"UID"=>99}>, \\
     #<Net::IMAP::FetchData seqno=8, attr={"UID"=>100}>]
p imap.fetch(6, "BODY[HEADER.FIELDS (SUBJECT)]")
#=> [#<Net::IMAP::FetchData seqno=6, attr={"BODY[HEADER.FIELDS (SUBJECT)]"=>"Subject: test\r\n\r\n"}>]
data = imap.uid_fetch(98, ["RFC822.SIZE", "INTERNALDATE"])[0]
p data.seqno
#=> 6
p data.attr["RFC822.SIZE"]
#=> 611
p data.attr["INTERNALDATE"]
#=> "12-Oct-2000 22:40:59 +0900"
p data.attr["UID"]
#=> 98
Search took: 8ms  ·  Total Results: 1179