Results for: "uniq"

This module has all methods of FileUtils module, but never changes files/directories, with printing message before acting. This equates to passing the :noop and :verbose flag to methods in FileUtils.

No documentation available
No documentation available

Immutable and read-only representation of a timestamp token info from a Response.

Class for representing WebDAV method UNLOCK:

require 'net/http'
uri = URI('http://example.com')
hostname = uri.hostname # => "example.com"
req = Net::HTTP::Unlock.new(uri) # => #<Net::HTTP::Unlock UNLOCK>
res = Net::HTTP.start(hostname) do |http|
  http.request(req)
end

See Request Headers.

Related:

No documentation available
No documentation available

A FetchError that indicates that the reason for not being able to fetch data was that the host could not be contacted

No documentation available

Error raised when no cdylib artifact was created

No documentation available

IO wrapper that allows writing a limited amount of data

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

Removes duplicate elements from self, the first occurrence always being retained; returns self if any elements removed, nil otherwise.

With no block given, identifies and removes elements using method eql? to compare.

Returns self if any elements removed:

a = [0, 0, 1, 1, 2, 2]
a.uniq! # => [0, 1, 2]

Returns nil if no elements removed.

With a block given, calls the block for each element; identifies (using method eql?) and removes elements for which the block returns duplicate values.

Returns self if any elements removed:

a = ['a', 'aa', 'aaa', 'b', 'bb', 'bbb']
a.uniq! {|element| element.size } # => ['a', 'aa', 'aaa']

Returns nil if no elements removed.

Returns true for IPv6 unique local address (fc00::/7, RFC4193). It returns false otherwise.

No documentation available

Returns a new Array that is the union of self and all given Arrays other_arrays; duplicates are removed; order is preserved; items are compared using eql?:

[0, 1, 2, 3].union([4, 5], [6, 7]) # => [0, 1, 2, 3, 4, 5, 6, 7]
[0, 1, 1].union([2, 1], [3, 1]) # => [0, 1, 2, 3]
[0, 1, 2, 3].union([3, 2], [1, 0]) # => [0, 1, 2, 3]

Returns a copy of self if no arguments given.

Related: Array#|.

Returns a new regexp that is the union of the given patterns:

r = Regexp.union(%w[cat dog])      # => /cat|dog/
r.match('cat')      # => #<MatchData "cat">
r.match('dog')      # => #<MatchData "dog">
r.match('cog')      # => nil

For each pattern that is a string, Regexp.new(pattern) is used:

Regexp.union('penzance')             # => /penzance/
Regexp.union('a+b*c')                # => /a\+b\*c/
Regexp.union('skiing', 'sledding')   # => /skiing|sledding/
Regexp.union(['skiing', 'sledding']) # => /skiing|sledding/

For each pattern that is a regexp, it is used as is, including its flags:

Regexp.union(/foo/i, /bar/m, /baz/x)
# => /(?i-mx:foo)|(?m-ix:bar)|(?x-mi:baz)/
Regexp.union([/foo/i, /bar/m, /baz/x])
# => /(?i-mx:foo)|(?m-ix:bar)|(?x-mi:baz)/

With no arguments, returns /(?!)/:

Regexp.union # => /(?!)/

If any regexp pattern contains captures, the behavior is unspecified.

Search took: 5ms  ·  Total Results: 409