Results for: "match"

Returns true for IPv4 private address (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). It returns false otherwise.

Returns true for IPv4-mapped IPv6 address (::ffff:0:0/80). It returns false otherwise.

Returns true for IPv4-compatible IPv6 address (::/80). It returns false otherwise.

Returns the socket path as a string.

Addrinfo.unix("/tmp/sock").unix_path       #=> "/tmp/sock"

See IO#each.

See IO#each_byte.

See IO#each_codepoint.

This returns the value that scan_until would return, without advancing the scan pointer. The match register is affected, though.

s = StringScanner.new("Fri Dec 12 1975 14:39")
s.check_until /12/          # -> "Fri Dec 12"
s.pos                       # -> 0
s.matched                   # -> 12

Mnemonic: it “checks” to see whether a scan_until will return a value.

Scans the string until the pattern is matched. Advances the scan pointer if advance_pointer_p, otherwise not. Returns the matched string if return_string_p is true, otherwise returns the number of bytes advanced. This method does affect the match register.

Creates GUID.

WIN32OLE.create_guid # => {1CB530F1-F6B1-404D-BCE6-1959BF91F4A8}

Returns major version.

tobj = WIN32OLE_TYPE.new('Microsoft Word 10.0 Object Library', 'Documents')
puts tobj.major_version # => 8

Returns the type library major version.

tlib = WIN32OLE_TYPELIB.new('Microsoft Excel 9.0 Object Library')
puts tlib.major_version # -> 1

Calls block once for each key in hsh, passing the value as a parameter.

If no block is given, an enumerator is returned instead.

h = { "a" => 100, "b" => 200 }
h.each_value {|value| puts value }

produces:

100
200

Calls block once for each key in hsh, passing the key as a parameter.

If no block is given, an enumerator is returned instead.

h = { "a" => 100, "b" => 200 }
h.each_key {|key| puts key }

produces:

a
b

Calls block once for each key in hsh, passing the key-value pair as parameters.

If no block is given, an enumerator is returned instead.

h = { "a" => 100, "b" => 200 }
h.each {|key, value| puts "#{key} is #{value}" }

produces:

a is 100
b is 200

Return an array containing the values associated with the given keys. Also see Hash.select.

h = { "cat" => "feline", "dog" => "canine", "cow" => "bovine" }
h.values_at("cow", "cat")  #=> ["bovine", "feline"]

Yields each environment variable name and value.

If no block is given an Enumerator is returned.

Yields each environment variable name.

An Enumerator is returned if no block is given.

Yields each environment variable value.

An Enumerator is returned if no block was given.

Returns an array containing the environment variable values associated with the given names. See also ENV.select.

Return the accept character set for all new CGI instances.

Set the accept character set for all new CGI instances.

This method is a shortcut for converting a single row (Array) into a CSV String.

The options parameter can be anything CSV::new() understands. This method understands an additional :encoding parameter to set the base Encoding for the output. This method will try to guess your Encoding from the first non-nil field in row, if possible, but you may need to use this parameter as a backup plan.

The :row_sep option defaults to $INPUT_RECORD_SEPARATOR ($/) when calling this method.

Stores the indicated separators for later use.

If auto-discovery was requested for @row_sep, this method will read ahead in the @io and try to find one. ARGF, STDIN, STDOUT, STDERR and any stream open for output only with a default @row_sep of $INPUT_RECORD_SEPARATOR ($/).

This method also establishes the quoting rules used for CSV output.

Serialization support for the object returned by _getobj_.

Search took: 4ms  ·  Total Results: 2033