Results for: "String#[]"

Set domain for which this cookie applies

A summary of cookie string.

No documentation available
No documentation available
No documentation available

This method will return the index of a field with the provided header. The offset can be used to locate duplicate header names, as described in CSV::Row.field().

Returns an ASCII-compatible String showing:

Example:

source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
table = CSV.parse(source, headers: true)
row = table[0]
row.inspect # => "#<CSV::Row \"Name\":\"foo\" \"Value\":\"0\">"

Shows the mode and size of this table in a US-ASCII String.

Winds back to the beginning

Get the URI of the remote object.

Get the URI of the remote object.

No documentation available
No documentation available
No documentation available
No documentation available

A setter to toggle transfers in binary mode. newmode is either true or false

Logs in to the remote host. The session must have been previously connected. If user is the string “anonymous” and the password is nil, “anonymous@” is used as a password. If the acct parameter is not nil, an FTP ACCT command is sent following the successful login. Raises an exception on error (typically Net::FTPPermError).

Retrieves remotefile in binary mode, storing the result in localfile. If localfile is nil, returns retrieved data. If a block is supplied, it is passed the retrieved data in blocksize chunks.

Transfers localfile to the server in binary mode, storing the result in remotefile. If a block is supplied, calls it, passing in the transmitted data in blocksize chunks.

Returns an array of filenames in the remote directory.

Returns an array of file information in the directory (the output is like ‘ls -l`). If a block is given, it iterates through the listing.

Returns data (e.g., size, last modification time, entry type, etc.) about the file or directory specified by pathname. If pathname is omitted, the current directory is assumed.

Returns system information.

Returns the status (STAT command).

pathname

when stat is invoked with pathname as a parameter it acts like list but a lot faster and over the same tcp session.

Posts data to the specified URI object.

Example:

require 'net/http'
require 'uri'

Net::HTTP.post URI('http://www.example.com/api/search'),
               { "q" => "ruby", "max" => "50" }.to_json,
               "Content-Type" => "application/json"
Search took: 4ms  ·  Total Results: 2678