Results for: "Logger"

Set the version to version, potentially also setting required_rubygems_version if version indicates it is a prerelease.

Display an informational alert. Will ask question if it is not nil.

No documentation available
No documentation available
No documentation available

Returns an array of syntax error messages

If no missing pairs are found it falls back on the original ripper error messages

No documentation available

Returns the parser to be used.

Unless a URI::Parser is defined, DEFAULT_PARSER is used.

Sets userinfo, argument is string like ‘name:pass’.

Args

v

String

Description

Public setter for the user component (with validation).

See also URI::Generic.check_user.

Usage

require 'uri'

uri = URI.parse("http://john:S3nsit1ve@my.example.com")
uri.user = "sam"
uri.to_s  #=> "http://sam:V3ry_S3nsit1ve@my.example.com"

Returns the userinfo, either as ‘user’ or ‘user:password’.

Returns the user component (without URI decoding).

Args

v

String

Description

Public setter for the query component v.

Usage

require 'uri'

uri = URI.parse("http://my.example.com/?id=25")
uri.query = "id=1"
uri.to_s  #=> "http://my.example.com/?id=1"

Returns true if URI is hierarchical.

Description

URI has components listed in order of decreasing significance from left to right, see RFC3986 tools.ietf.org/html/rfc3986 1.2.3.

Usage

require 'uri'

uri = URI.parse("http://my.example.com/")
uri.hierarchical?
#=> true
uri = URI.parse("mailto:joe@example.com")
uri.hierarchical?
#=> false

Args

v

URI or String

Description

Attempts to parse other URI oth, returns [parsed_oth, self].

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.coerce("http://foo.com")
#=> [#<URI::HTTP http://foo.com>, #<URI::HTTP http://my.example.com>]

Returns filter.

Setter for filter val.

Checks if URI has a path. For URI::LDAP this will return false.

Setter for headers v.

Returns a Hash (not a DBM database) created by using each value in the database as a key, with the corresponding key as its value.

Note that all values in the hash will be Strings, but the keys will be actual objects.

Returns the number of the signal that caused stat to terminate (or nil if self was not terminated by an uncaught signal).

Called when the current thread exits. The scheduler is expected to implement this method in order to allow all waiting fibers to finalize their execution.

The suggested pattern is to implement the main event loop in the close method.

Invoked by methods like Thread.join, and by Mutex, to signify that current Fiber is blocked until further notice (e.g. unblock) or until timeout has elapsed.

blocker is what we are waiting on, informational only (for debugging and logging). There are no guarantee about its value.

Expected to return boolean, specifying whether the blocking operation was successful or not.

Invoked to wake up Fiber previously blocked with block (for example, Mutex#lock calls block and Mutex#unlock calls unblock). The scheduler should use the fiber parameter to understand which fiber is unblocked.

blocker is what was awaited for, but it is informational only (for debugging and logging), and it is not guaranteed to be the same value as the blocker for block.

Implementation of the Fiber.schedule. The method is expected to immediately run the given block of code in a separate non-blocking fiber, and to return that Fiber.

Minimal suggested implementation is:

def fiber(&block)
  fiber = Fiber.new(blocking: false, &block)
  fiber.resume
  fiber
end
Search took: 5ms  ·  Total Results: 2182