Results for: "remove_const"

Expire memoized instance variables that can incorrectly generate, replace or miss files due changes in certain attributes used to compute them.

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

Creates a self-signed certificate with an issuer and subject from email, a subject alternative name of email and the given extensions for the key.

Returns the result of the peer certificates verification. See verify(1) for error values and descriptions.

If no peer certificate was presented X509_V_OK is returned.

No documentation available

Convert klassname to a Class

Extracts the certificate chain from the spec and calls verify to ensure the signatures and certificate chain is valid according to the policy..

No documentation available
No documentation available
No documentation available

Returns a new array containing only those elements from self that are not found in any of the given other_arrays; items are compared using eql?; order from self is preserved:

[0, 1, 1, 2, 1, 1, 3, 1, 1].difference([1]) # => [0, 2, 3]
[0, 1, 2, 3].difference([3, 0], [1, 3])     # => [2]
[0, 1, 2].difference([4])                   # => [0, 1, 2]
[0, 1, 2].difference                        # => [0, 1, 2]

Returns a copy of self if no arguments are given.

Related: Array#-; see also Methods for Combining.

Returns true if the count of elements in self is zero, false otherwise.

Related: see Methods for Querying.

With a block given, returns a new array whose elements are all those from self for which the block returns false or nil:

a = [:foo, 'bar', 2, 'bat']
a1 = a.reject {|element| element.to_s.start_with?('b') }
a1 # => [:foo, 2]

With no block given, returns a new Enumerator.

Related: Methods for Fetching.

With a block given, calls the block with each element of self; removes each element for which the block returns a truthy value.

Returns self if any elements removed:

a = [:foo, 'bar', 2, 'bat']
a.reject! {|element| element.to_s.start_with?('b') } # => [:foo, 2]

Returns nil if no elements removed.

With no block given, returns a new Enumerator.

Related: see Methods for Deleting.

Replaces the elements of self with the elements of other_array, which must be an array-convertible object; returns self:

a = ['a', 'b', 'c']   # => ["a", "b", "c"]
a.replace(['d', 'e']) # => ["d", "e"]

Related: see Methods for Assigning.

Freezes self (if not already frozen); returns self:

a = []
a.frozen? # => false
a.freeze
a.frozen? # => true

No further changes may be made to self; raises FrozenError if a change is attempted.

Related: Kernel#frozen?.

Prepends the given objects to self:

a = [:foo, 'bar', 2]
a.unshift(:bam, :bat) # => [:bam, :bat, :foo, "bar", 2]

Related: Array#shift; see also Methods for Assigning.

Returns the predecessor of self (equivalent to self - 1):

1.pred  #=> 0
-1.pred #=> -2

Related: Integer#succ (successor value).

Returns self modulo other as a real number.

For integer n and real number r, these expressions are equivalent:

n % r
n-r*(n/r).floor
n.divmod(r)[1]

See Numeric#divmod.

Examples:

10 % 2              # => 0
10 % 3              # => 1
10 % 4              # => 2

10 % -2             # => 0
10 % -3             # => -2
10 % -4             # => -2

10 % 3.0            # => 1.0
10 % Rational(3, 1) # => (1/1)

Returns a 2-element array [q, r], where

q = (self/other).floor    # Quotient
r = self % other          # Remainder

Examples:

11.divmod(4)              # => [2, 3]
11.divmod(-4)             # => [-3, -1]
-11.divmod(4)             # => [-3, 1]
-11.divmod(-4)            # => [2, -3]

12.divmod(4)              # => [3, 0]
12.divmod(-4)             # => [-3, 0]
-12.divmod(4)             # => [-3, 0]
-12.divmod(-4)            # => [3, 0]

13.divmod(4.0)            # => [3, 1.0]
13.divmod(Rational(4, 1)) # => [3, (1/1)]

Returns true if self is an even number, false otherwise.

Returns a new Complex object formed from the arguments, each of which must be an instance of Numeric, or an instance of one of its subclasses: Complex, Float, Integer, Rational; see Rectangular Coordinates:

Complex.rect(3)             # => (3+0i)
Complex.rect(3, Math::PI)   # => (3+3.141592653589793i)
Complex.rect(-3, -Math::PI) # => (-3-3.141592653589793i)

Complex.rectangular is an alias for Complex.rect.

Search took: 2ms  ·  Total Results: 3274