Results for: "minmax"

Returns the remainder from dividing by the value.

x.remainder(y) means x-y*(x/y).truncate

Returns nil, -1, or +1 depending on whether the value is finite, -Infinity, or +Infinity.

Returns the denominator (always positive).

Rational(7).denominator             #=> 1
Rational(7, 1).denominator          #=> 1
Rational(9, -4).denominator         #=> 4
Rational(-2, -10).denominator       #=> 5
No documentation available
No documentation available
No documentation available

Returns the minute (0-59).

DateTime.new(2001,2,3,4,5,6).min          #=> 5

Returns the minute (0-59).

DateTime.new(2001,2,3,4,5,6).min          #=> 5

Returns the minute of the hour (0..59) for time.

t = Time.now   #=> 2007-11-19 08:25:51 -0600
t.min          #=> 25

Puts ios into binary mode. Once a stream is in binary mode, it cannot be reset to nonbinary mode.

Returns true if ios is binmode.

Returns the minimum value in self, using method <=> or a given block for comparison.

With no argument and no block given, returns the minimum-valued element of self.

(1..4).min     # => 1
('a'..'d').min # => "a"
(-4..-1).min   # => -4

With non-negative integer argument n given, and no block given, returns the n minimum-valued elements of self in an array:

(1..4).min(2)     # => [1, 2]
('a'..'d').min(2) # => ["a", "b"]
(-4..-1).min(2)   # => [-4, -3]
(1..4).min(50)    # => [1, 2, 3, 4]

If a block is given, it is called:

To illustrate:

(1..4).min {|a, b| p [a, b]; a <=> b } # => 1

Output:

[2, 1]
[3, 1]
[4, 1]

With no argument and a block given, returns the return value of the last call to the block:

(1..4).min {|a, b| -(a <=> b) } # => 4

With non-negative integer argument n given, and a block given, returns the return values of the last n calls to the block in an array:

(1..4).min(2) {|a, b| -(a <=> b) }  # => [4, 3]
(1..4).min(50) {|a, b| -(a <=> b) } # => [4, 3, 2, 1]

Returns an empty array if n is zero:

(1..4).min(0)                      # => []
(1..4).min(0) {|a, b| -(a <=> b) } # => []

Returns nil or an empty array if:

Raises an exception if either:

Related: Range#max, Range#minmax.

Returns the maximum value in self, using method <=> or a given block for comparison.

With no argument and no block given, returns the maximum-valued element of self.

(1..4).max     # => 4
('a'..'d').max # => "d"
(-4..-1).max   # => -1

With non-negative integer argument n given, and no block given, returns the n maximum-valued elements of self in an array:

(1..4).max(2)     # => [4, 3]
('a'..'d').max(2) # => ["d", "c"]
(-4..-1).max(2)   # => [-1, -2]
(1..4).max(50)    # => [4, 3, 2, 1]

If a block is given, it is called:

To illustrate:

(1..4).max {|a, b| p [a, b]; a <=> b } # => 4

Output:

[2, 1]
[3, 2]
[4, 3]

With no argument and a block given, returns the return value of the last call to the block:

(1..4).max {|a, b| -(a <=> b) } # => 1

With non-negative integer argument n given, and a block given, returns the return values of the last n calls to the block in an array:

(1..4).max(2) {|a, b| -(a <=> b) }  # => [1, 2]
(1..4).max(50) {|a, b| -(a <=> b) } # => [1, 2, 3, 4]

Returns an empty array if n is zero:

(1..4).max(0)                      # => []
(1..4).max(0) {|a, b| -(a <=> b) } # => []

Returns nil or an empty array if:

Raises an exception if either:

Related: Range#min, Range#minmax.

Return true if the receiver matches the given pattern.

See File.fnmatch.

Return true if the receiver matches the given pattern.

See File.fnmatch.

Puts stream into binary mode. See IO#binmode.

Sets the scan pointer to the end of the string and clear matching data.

Returns the method invoke kind.

tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'Workbooks')
method = WIN32OLE_METHOD.new(tobj, 'Add')
puts method.invkind # => 1

Puts ARGF into binary mode. Once a stream is in binary mode, it cannot be reset to non-binary mode. This option has the following effects:

Returns true if ARGF is being read in binary mode; false otherwise. To enable binary mode use ARGF.binmode.

For example:

ARGF.binmode?  #=> false
ARGF.binmode
ARGF.binmode?  #=> true
No documentation available

Explicitly terminate option processing.

Returns true if option processing has terminated, false otherwise.

Terminates option parsing. Optional parameter arg is a string pushed back to be the first non-option argument.

No documentation available
Search took: 4ms  ·  Total Results: 1759