Results for: "match"

Returns normalized URI.

require 'uri'

URI("HTTP://my.EXAMPLE.com").normalize
#=> #<URI::HTTP http://my.example.com/>

Normalization here means:

Destructive version of normalize.

Returns attributes.

Setter for attributes val.

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

Updates the database with multiple values from the specified object. Takes any object which implements the each_pair method, including Hash and DBM objects.

Returns self.

No documentation available

Returns the least significant eight bits of the return code of the process if it has exited; nil otherwise:

`exit 99`
$?.exitstatus # => 99

Obtains a lock, runs the block, and releases the lock when the block completes. See the example under Thread::Mutex.

Returns the maximum size of the queue.

Sets the maximum size of the queue to the given number.

Returns the conversion path of ec.

The result is an array of conversions.

ec = Encoding::Converter.new("ISO-8859-1", "EUC-JP", crlf_newline: true)
p ec.convpath
#=> [[#<Encoding:ISO-8859-1>, #<Encoding:UTF-8>],
#    [#<Encoding:UTF-8>, #<Encoding:EUC-JP>],
#    "crlf_newline"]

Each element of the array is a pair of encodings or a string. A pair means an encoding conversion. A string means a decorator.

In the above example, [#<Encoding:ISO-8859-1>,

Iterates over keys and values. Note that unlike other collections, each without block isn’t supported.

Updates the digest using a given string and returns self.

The update() method and the left-shift operator are overridden by each implementation subclass. (One should be an alias for the other)

Construct a new class given a C:

Fiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an easy-to-use manner.

Examples:

require 'fiddle/struct'
require 'fiddle/cparser'

include Fiddle::CParser

types, members = parse_struct_signature(['int i','char c'])

MyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members)

MyStruct.malloc(Fiddle::RUBY_FREE) do |obj|
  ...
end

obj = MyStruct.malloc(Fiddle::RUBY_FREE)
begin
  ...
ensure
  obj.call_free
end

obj = MyStruct.malloc
begin
  ...
ensure
  Fiddle.free obj.to_ptr
end

Construct a new class given a C:

Fiddle::Importer#struct and Fiddle::Importer#union wrap this functionality in an easy-to-use manner.

Examples:

require 'fiddle/struct'
require 'fiddle/cparser'

include Fiddle::CParser

types, members = parse_struct_signature(['int i','char c'])

MyStruct = Fiddle::CStructBuilder.create(Fiddle::CUnion, types, members)

MyStruct.malloc(Fiddle::RUBY_FREE) do |obj|
  ...
end

obj = MyStruct.malloc(Fiddle::RUBY_FREE)
begin
  ...
ensure
  obj.call_free
end

obj = MyStruct.malloc
begin
  ...
ensure
  Fiddle.free obj.to_ptr
end

Executes the block for every line in the stream where lines are separated by eol.

See also gets

Reads one character from the stream. Returns nil if called at end of file.

Reads a one-character string from the stream. Raises an EOFError at end of file.

Pushes character c back onto the stream such that a subsequent buffered character read will return it.

Unlike IO#getc multiple bytes may be pushed back onto the stream.

Has no effect on unbuffered reads (such as sysread).

Return true if the PRNG has been seeded with enough data, false otherwise.

Generate a Checkbox Input element as a string.

The attributes of the element can be specified as three arguments, name, value, and checked. checked is a boolean value; if true, the CHECKED attribute will be included in the element.

Alternatively, the attributes can be specified as a hash.

checkbox("name")
  # = checkbox("NAME" => "name")

checkbox("name", "value")
  # = checkbox("NAME" => "name", "VALUE" => "value")

checkbox("name", "value", true)
  # = checkbox("NAME" => "name", "VALUE" => "value", "CHECKED" => true)
No documentation available

Returns true if field 'Transfer-Encoding' exists and has value 'chunked', false otherwise; see Transfer-Encoding response header:

res = Net::HTTP.get_response(hostname, '/todos/1')
res['Transfer-Encoding'] # => "chunked"
res.chunked?             # => true

returns a charset parameter in Content-Type field. It is downcased for canonicalization.

If charset parameter is not given but a block is given, the block is called and its result is returned. It can be used to guess charset.

If charset parameter and block is not given, nil is returned except text type. In that case, “utf-8” is returned as defined by RFC6838 4.2.1

Search took: 4ms  ·  Total Results: 2599