Results for: "Logger"

Secure random number generator interface.

This library is an interface to secure random number generators which are suitable for generating session keys in HTTP cookies, etc.

You can use this library in your application by requiring it:

require 'securerandom'

It supports the following secure random number generators:

SecureRandom is extended by the Random::Formatter module which defines the following methods:

These methods are usable as class methods of SecureRandom such as ‘SecureRandom.hex`.

Examples

Generate random hexadecimal strings:

require 'securerandom'

SecureRandom.hex(10) #=> "52750b30ffbc7de3b362"
SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559"
SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23"

Generate random base64 strings:

SecureRandom.base64(10) #=> "EcmTPZwWRAozdA=="
SecureRandom.base64(10) #=> "KO1nIU+p9DKxGg=="
SecureRandom.base64(12) #=> "7kJSM/MzBJI+75j8"

Generate random binary strings:

SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301"
SecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337"

Generate alphanumeric strings:

SecureRandom.alphanumeric(10) #=> "S8baxMJnPl"
SecureRandom.alphanumeric(10) #=> "aOxAg8BAJe"

Generate UUIDs:

SecureRandom.uuid #=> "2d931510-d99f-494a-8c67-87feb05e1594"
SecureRandom.uuid #=> "bad85eb9-0713-4da7-8d36-07a8e4b00eab"

This is not an existing class, but documentation of the interface that Scheduler object should comply in order to be used as Fiber.scheduler and handle non-blocking fibers. See also the “Non-blocking fibers” section in Fiber class docs for explanations of some concepts.

Scheduler’s behavior and usage are expected to be as follows:

A typical implementation would probably rely for this closing loop on a gem like EventMachine or Async.

This way concurrent execution will be achieved in a way that is transparent for every individual Fiber’s code.

Hook methods are:

When not specified otherwise, the hook implementations are mandatory: if they are not implemented, the methods trying to call hook will fail. To provide backward compatibility, in the future hooks will be optional (if they are not implemented, due to the scheduler being created for the older Ruby version, the code which needs this hook will not fail, and will just behave in a blocking fashion).

It is also strongly suggested that the scheduler implement the fiber method, which is delegated to by Fiber.schedule.

Sample toy implementation of the scheduler can be found in Ruby’s code, in test/fiber/scheduler.rb

Generator

Cleared reference exception

This exception is raised if a parser error occurs.

This exception is raised if the nesting of parsed data structures is too deep.

No documentation available

General error for openssl library configuration files. Including formatting, parsing errors, etc.

No documentation available

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.

Subclass of Zlib::Error. This error is raised when the zlib stream is currently in progress.

For example:

inflater = Zlib::Inflate.new
inflater.inflate(compressed) do
  inflater.inflate(compressed) # Raises Zlib::InProgressError
end

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

Error raised by the DRb module when an attempt is made to refer to the context’s current drb server but the context does not have one. See current_server.

Class representing a drb server instance.

A DRbServer must be running in the local process before any incoming dRuby calls can be accepted, or any local objects can be passed as dRuby references to remote processes, even if those local objects are never actually called remotely. You do not need to start a DRbServer in the local process if you are only making outgoing dRuby calls passing marshalled parameters.

Unless multiple servers are being used, the local DRbServer is normally started by calling DRb.start_service.

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

HTTPGenericRequest is the parent of the Net::HTTPRequest class. Do not use this directly; use a subclass of Net::HTTPRequest.

Mixes in the Net::HTTPHeader module to provide easier access to HTTP headers.

No documentation available

Represents SMTP error code 4xx, a temporary error.

An abstract class for enumerating pseudo-prime numbers.

Concrete subclasses should override succ, next, rewind.

An implementation of PseudoPrimeGenerator which uses a prime table generated by trial division.

Generates all integers which are greater than 2 and are not divisible by either 2 or 3.

This is a pseudo-prime generator, suitable on checking primality of an integer by brute force method.

Search took: 4ms  ·  Total Results: 2079