Results for: "to_proc"

exception to wait for reading by EWOULDBLOCK. see IO.select.

exception to wait for writing by EWOULDBLOCK. see IO.select.

The error thrown when the parser encounters illegal CSV formatting.

CSV::Row

A CSV::Row instance represents a CSV table row. (see class CSV).

The instance may have:

Instance Methods

CSV::Row has three groups of instance methods:

Creating a CSV::Row Instance

Commonly, a new CSV::Row instance is created by parsing CSV source that has headers:

source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
table = CSV.parse(source, headers: true)
table.each {|row| p row }

Output:

#<CSV::Row "Name":"foo" "Value":"0">
#<CSV::Row "Name":"bar" "Value":"1">
#<CSV::Row "Name":"baz" "Value":"2">

You can also create a row directly. See ::new.

Headers

Like a CSV::Table, a CSV::Row has headers.

A CSV::Row that was created by parsing CSV source inherits its headers from the table:

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

You can also create a new row with headers; like the keys in a Hash, the headers need not be Strings:

row = CSV::Row.new([:name, :value], ['foo', 0])
row.headers # => [:name, :value]

The new row retains its headers even if added to a table that has headers:

table << row # => #<CSV::Table mode:col_or_row row_count:5>
row.headers # => [:name, :value]
row[:name] # => "foo"
row['Name'] # => nil

Accessing Fields

You may access a field in a CSV::Row with either its Integer index (Array-style) or its header (Hash-style).

Fetch a field using method []:

row = CSV::Row.new(['Name', 'Value'], ['foo', 0])
row[1] # => 0
row['Value'] # => 0

Set a field using method []=:

row = CSV::Row.new(['Name', 'Value'], ['foo', 0])
row # => #<CSV::Row "Name":"foo" "Value":0>
row[0] = 'bar'
row['Value'] = 1
row # => #<CSV::Row "Name":"bar" "Value":1>
No documentation available

Superclass of all errors raised in the DRb module.

Error raised when an error occurs on the underlying communication protocol.

An exception wrapping a DRb::DRbUnknown object

An exception wrapping an error object

The default drb protocol which communicates over a TCP socket.

The DRb TCP protocol URI looks like: druby://<host>:<port>?<option>. The option is optional.

The protocol for DRb over an SSL socket

The URI for a DRb socket over SSL is: drbssl://<host>:<port>?<option>. The option is optional

Implements DRb over a UNIX socket

DRb UNIX socket URIs look like drbunix:<path>?<option>. The option is optional.

Error types.

Generic IPAddr related error. Exceptions raised in this class should inherit from Error.

Raised when the provided IP address is an invalid address.

Raised when the address family is invalid such as an address with an unsupported family, an address with an inconsistent family, or an address who’s family cannot be determined.

No documentation available
No documentation available
No documentation available

HTTP request class. This class wraps together the request header and the request path. You cannot use this class directly. Instead, you should use one of its subclasses: Net::HTTP::Get, Net::HTTP::Post, Net::HTTP::Head.

HTTP response class.

This class wraps together the response header and the response body (the entity requested).

It mixes in the HTTPHeader module, which provides access to response header values both via hash-like methods and via individual readers.

Note that each possible HTTP response code defines its own HTTPResponse subclass. All classes are defined under the Net module. Indentation indicates inheritance. For a list of the classes see Net::HTTP.

Correspondence HTTP code => class is stored in CODE_TO_OBJ constant:

Net::HTTPResponse::CODE_TO_OBJ['404'] #=> Net::HTTPNotFound
No documentation available
No documentation available
No documentation available
No documentation available
Search took: 6ms  ·  Total Results: 1689