Results for: "remove_const"

Raised when trying to use an expired tuple.

Note: Don’t use this class directly. This is an internal class.

No documentation available

This class is the base class for Net::HTTP response classes.

About the Examples

Returned Responses

Method Net::HTTP.get_response returns an instance of one of the subclasses of Net::HTTPResponse:

Net::HTTP.get_response(uri)
# => #<Net::HTTPOK 200 OK readbody=true>
Net::HTTP.get_response(hostname, '/nosuch')
# => #<Net::HTTPNotFound 404 Not Found readbody=true>

As does method Net::HTTP#request:

req = Net::HTTP::Get.new(uri)
Net::HTTP.start(hostname) do |http|
  http.request(req)
end # => #<Net::HTTPOK 200 OK readbody=true>

Class Net::HTTPResponse includes module Net::HTTPHeader, which provides access to response header values via (among others):

Examples:

res = Net::HTTP.get_response(uri) # => #<Net::HTTPOK 200 OK readbody=true>
res['Content-Type']               # => "text/html; charset=UTF-8"
res.content_type                  # => "text/html"

Response Subclasses

Class Net::HTTPResponse has a subclass for each HTTP status code. You can look up the response class for a given code:

Net::HTTPResponse::CODE_TO_OBJ['200'] # => Net::HTTPOK
Net::HTTPResponse::CODE_TO_OBJ['400'] # => Net::HTTPBadRequest
Net::HTTPResponse::CODE_TO_OBJ['404'] # => Net::HTTPNotFound

And you can retrieve the status code for a response object:

Net::HTTP.get_response(uri).code                 # => "200"
Net::HTTP.get_response(hostname, '/nosuch').code # => "404"

The response subclasses (indentation shows class hierarchy):

There is also the Net::HTTPBadResponse exception which is raised when there is a protocol error.

No documentation available

Response class for Non-Authoritative Information responses (status code 203).

The Non-Authoritative Information response indicates that the server is a transforming proxy (such as a Web accelerator) that received a 200 OK response from its origin, and is returning a modified version of the origin’s response.

References:

Response class for Reset Content responses (status code 205).

The Reset Content response indicates that the server successfully processed the request, asks that the client reset its document view, and is not returning any content.

References:

Response class for URI Too Long responses (status code 414).

The URI provided was too long for the server to process.

References:

Response class for Request Header Fields Too Large responses (status code 431).

An individual header field is too large, or all the header fields collectively, are too large.

References:

Response class for Unavailable For Legal Reasons responses (status code 451).

A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.

References:

Represents referencing an instance variable.

@foo
^^^^

Raised to indicate that a system exit should occur with the specified exit_code

Raised by transcoding methods when a named encoding does not correspond with a known converter.

Encoding conversion class.

Mixin methods for –version and –platform Gem::Command options.

In-memory session storage class.

Implements session storage as a global in-memory hash. Session data will only persist for as long as the Ruby interpreter instance does.

The RequirementList is used to hold the requirements being considered while resolving a set of gems.

The RequirementList acts like a queue where the oldest items are removed first.

No documentation available

Psych::Stream is a streaming YAML emitter. It will not buffer your YAML, but send it straight to an IO.

Here is an example use:

stream = Psych::Stream.new($stdout)
stream.start
stream.push({:foo => 'bar'})
stream.finish

YAML will be immediately emitted to $stdout with no buffering.

Psych::Stream#start will take a block and ensure that Psych::Stream#finish is called, so you can do this form:

stream = Psych::Stream.new($stdout)
stream.start do |em|
  em.push(:foo => 'bar')
end

ResolutionError is the error class for socket name resolution.

No documentation available
No documentation available

Subclass of Zlib::Error

When zlib returns a Z_STREAM_END is return if the end of the compressed data has been reached and all uncompressed out put has been produced.

Subclass of Zlib::Error

When zlib returns a Z_STREAM_ERROR, usually if the stream state was inconsistent.

Subclass of Zlib::Error

When zlib returns a Z_VERSION_ERROR, usually if the zlib library version is incompatible with the version assumed by the caller.

Search took: 7ms  ·  Total Results: 4862