Results for: "OptionParser"

No documentation available
No documentation available

Components of the URI in the order.

Components of the URI in the order.

Args

v

String

Description

Public setter for the password component (with validation).

See also URI::Generic.check_password.

Usage

require 'uri'

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

Returns the password component (without URI decoding).

Args

v

String

Description

Public setter for the path component v (with validation).

See also URI::Generic.check_path.

Usage

require 'uri'

uri = URI.parse("http://my.example.com/pub/files")
uri.path = "/faq/"
uri.to_s  #=> "http://my.example.com/faq/"

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 does not have a scheme (e.g. http:// or https://) specified.

Args

oth

URI or String

Description

Destructive form of merge.

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.merge!("/main.rbx?page=1")
uri.to_s  # => "http://my.example.com/main.rbx?page=1"

Args

oth

URI or String

Description

Merges two URIs.

Usage

require 'uri'

uri = URI.parse("http://my.example.com")
uri.merge("/main.rbx?page=1")
# => "http://my.example.com/main.rbx?page=1"

Args

components

Multiple Symbol arguments defined in URI::HTTP.

Description

Selects specified components from URI.

Usage

require 'uri'

uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx')
uri.select(:userinfo, :host, :path)
# => ["myuser:mypass", "my.example.com", "/test.rbx"]

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 scope.

Setter for scope val.

Returns filter.

Setter for filter val.

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.

If a block is provided, returns a new array containing [key, value] pairs for which the block returns true.

Otherwise, same as values_at

Returns true if this process is stopped, and if the corresponding wait call had the Process::WUNTRACED flag set, false otherwise.

Returns the number of the signal that caused the process to stop, or nil if the process is not stopped.

Returns the number of the signal that caused the process to terminate or nil if the process was not terminated by an uncaught signal.

No documentation available

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.

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: 8ms  ·  Total Results: 6041