Results for: "Pathname"

This class is used as a return value from ObjectSpace::reachable_objects_from.

When ObjectSpace::reachable_objects_from returns an object with references to an internal object, an instance of this class is returned.

You can use the type method to check the type of the internal object.

Subclasses ‘BadAlias` for backwards compatibility

YAML event parser class. This class parses a YAML document and calls events on the handler that is passed to the constructor. The events can be used for things such as constructing a YAML AST or deserializing YAML documents. It can even be fed back to Psych::Emitter to emit the same document that was parsed.

See Psych::Handler for documentation on the events that Psych::Parser emits.

Here is an example that prints out ever scalar found in a YAML document:

# Handler for detecting scalar values
class ScalarHandler < Psych::Handler
  def scalar value, anchor, tag, plain, quoted, style
    puts value
  end
end

parser = Psych::Parser.new(ScalarHandler.new)
parser.parse(yaml_document)

Here is an example that feeds the parser back in to Psych::Emitter. The YAML document is read from STDIN and written back out to STDERR:

parser = Psych::Parser.new(Psych::Emitter.new($stderr))
parser.parse($stdin)

Psych uses Psych::Parser in combination with Psych::TreeBuilder to construct an AST of the parsed YAML document.

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

Socket::AncillaryData represents the ancillary data (control information) used by sendmsg and recvmsg system call. It contains socket family, control message (cmsg) level, cmsg type and cmsg data.

Raised when OLE processing failed.

EX:

obj = WIN32OLE.new("NonExistProgID")

raises the exception:

WIN32OLE::RuntimeError: unknown OLE server: `NonExistProgID'
    HRESULT error code:0x800401f3
      Invalid class string

Subclass of Zlib::Error when zlib returns a Z_DATA_ERROR.

Usually if a stream was prematurely freed.

Zlib::ZStream is the abstract class for the stream which handles the compressed data. The operations are defined in the subclasses: Zlib::Deflate for compression, and Zlib::Inflate for decompression.

An instance of Zlib::ZStream has one stream (struct zstream in the source) and two variable-length buffers which associated to the input (next_in) of the stream and the output (next_out) of the stream. In this document, “input buffer” means the buffer for input, and “output buffer” means the buffer for output.

Data input into an instance of Zlib::ZStream are temporally stored into the end of input buffer, and then data in input buffer are processed from the beginning of the buffer until no more output from the stream is produced (i.e. until avail_out > 0 after processing). During processing, output buffer is allocated and expanded automatically to hold all output data.

Some particular instance methods consume the data in output buffer and return them as a String.

Here is an ascii art for describing above:

+================ an instance of Zlib::ZStream ================+
||                                                            ||
||     +--------+          +-------+          +--------+      ||
||  +--| output |<---------|zstream|<---------| input  |<--+  ||
||  |  | buffer |  next_out+-------+next_in   | buffer |   |  ||
||  |  +--------+                             +--------+   |  ||
||  |                                                      |  ||
+===|======================================================|===+
    |                                                      |
    v                                                      |
"output data"                                         "input data"

If an error occurs during processing input buffer, an exception which is a subclass of Zlib::Error is raised. At that time, both input and output buffer keep their conditions at the time when the error occurs.

Method Catalogue

Many of the methods in this class are fairly low-level and unlikely to be of interest to users. In fact, users are unlikely to use this class directly; rather they will be interested in Zlib::Inflate and Zlib::Deflate.

The higher level methods are listed below.

Zlib::Deflate is the class for compressing data. See Zlib::ZStream for more information.

Zlib:Inflate is the class for decompressing compressed data. Unlike Zlib::Deflate, an instance of this class is not able to duplicate (clone, dup) itself.

Objects of class File::Stat encapsulate common status information for File objects. The information is recorded at the moment the File::Stat object is created; changes made to the file after that point will not be reflected. File::Stat objects are returned by IO#stat, File::stat, File#lstat, and File::lstat. Many of these methods return platform-specific values, and not all values are meaningful on all systems. See also Kernel#test.

Can be raised by IO operations when IO#timeout= is set.

The DidYouMean::Formatter is the basic, default formatter for the gem. The formatter responds to the message_for method and it returns a human readable string.

The DidYouMean::Formatter is the basic, default formatter for the gem. The formatter responds to the message_for method and it returns a human readable string.

The DidYouMean::Formatter is the basic, default formatter for the gem. The formatter responds to the message_for method and it returns a human readable string.

No documentation available

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.

Default formatter for log messages.

No documentation available

Parent class for informational (1xx) HTTP response classes.

An informational response indicates that the request was received and understood.

References:

Response class for Created responses (status code 201).

The Created response indicates that the server has received and has fulfilled a request to create a new resource.

References:

Response class for Accepted responses (status code 202).

The Accepted response indicates that the server has received and is processing a request, but the processing has not yet been completed.

References:

Response class for Partial Content responses (status code 206).

The Partial Content response indicates that the server is delivering only part of the resource (byte serving) due to a Range header in the request.

References:

Response class for Multi-Status (WebDAV) responses (status code 207).

The Multi-Status (WebDAV) response indicates that the server has received the request, and that the message body can contain a number of separate response codes.

References:

Response class for Already Reported (WebDAV) responses (status code 208).

The Already Reported (WebDAV) response indicates that the server has received the request, and that the members of a DAV binding have already been enumerated in a preceding part of the (multi-status) response, and are not being included again.

References:

Search took: 6ms  ·  Total Results: 2413