るりまサーチ

最速Rubyリファレンスマニュアル検索!
201件ヒット [1-100件を表示] (0.162秒)

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n=
  3. rsa n
  4. openssl n=
  5. openssl n

ライブラリ

クラス

モジュール

キーワード

検索結果

<< 1 2 3 > >>

Integer#>=(other) -> bool (21119.0)

比較演算子。数値として等しいまたは大きいか判定します。

...other 比較対象の数値
@return self よりも other の方が小さい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返します。

//emlist[][ruby]{
1 >= 0 # => true
1 >= 1 # => true
1 >= 2 # => false
//}...

Fixnum#>=(other) -> bool (21101.0)

比較演算子。数値として等しいまたは大きいか判定します。

...比較演算子。数値として等しいまたは大きいか判定します。

@param other 比較対象の数値
@return self よりも other の方が小さい場合か、
両者が等しい場合 true を返します。
そうでなければ false を返しま...

Module#>=(other) -> bool | nil (18237.0)

比較演算子。self が other の先祖か同一クラスである場合、 true を返します。 self が other の子孫である場合、false を返します。

...
n
il を返します。

@param other 比較対象のモジュールやクラス

@raise TypeError other がクラスやモジュールではない場合に発生します。

@see Module#<

//emlist[例][ruby]{
module Foo; end
module Bar
include Foo
end
module Baz
prepend Foo
end

Bar.ancest...
...ors # => [Bar, Foo]
Foo >= Bar # => true
Bar >= Foo # => false

Baz.ancestors # => [Foo, Baz]
Foo >= Baz # => true
Baz >= Foo # => false

Foo >= Foo # => true
Foo >= Object # => nil
//}...

Array#bsearch_index -> Enumerator (6141.0)

ブロックの評価結果で範囲内の各要素の判定を行い、条件を満たす値の位置を 二分探索(計算量は O(log n))で検索します。要素が見つからない場合は nil を返します。self はあらかじめソートしておく必要があります。

...価結果で範囲内の各要素の判定を行い、条件を満たす値の位置を
二分探索(計算量は O(log n))で検索します。要素が見つからない場合は nil
を返します。self はあらかじめソートしておく必要があります。

本メソッドはArray#bse...
...い。

//emlist[例: find-minimum モード][ruby]{
ary = [0, 4, 7, 10, 12]
ary.bsearch_index { |x| x >= 4 } # => 1
ary.bsearch_index { |x| x >= 6 } # => 2
ary.bsearch_index { |x| x >= -1 } # => 0
ary.bsearch_index { |x| x >= 100 } # => nil
//}

//emlist[例: find-any モード][ruby]{
ary = [...
...0, 4, 7, 10, 12]
# 4 <= v < 8 になる要素の位置を検索
ary.bsearch_index { |x| 1 - x / 4 } # => 2
# 8 <= v < 10 になる要素の位置を検索
ary.bsearch_index { |x| 4 - x / 2 } # => nil
//}

@see Array#bsearch...

Array#bsearch_index { |x| ... } -> Integer | nil (6141.0)

ブロックの評価結果で範囲内の各要素の判定を行い、条件を満たす値の位置を 二分探索(計算量は O(log n))で検索します。要素が見つからない場合は nil を返します。self はあらかじめソートしておく必要があります。

...価結果で範囲内の各要素の判定を行い、条件を満たす値の位置を
二分探索(計算量は O(log n))で検索します。要素が見つからない場合は nil
を返します。self はあらかじめソートしておく必要があります。

本メソッドはArray#bse...
...い。

//emlist[例: find-minimum モード][ruby]{
ary = [0, 4, 7, 10, 12]
ary.bsearch_index { |x| x >= 4 } # => 1
ary.bsearch_index { |x| x >= 6 } # => 2
ary.bsearch_index { |x| x >= -1 } # => 0
ary.bsearch_index { |x| x >= 100 } # => nil
//}

//emlist[例: find-any モード][ruby]{
ary = [...
...0, 4, 7, 10, 12]
# 4 <= v < 8 になる要素の位置を検索
ary.bsearch_index { |x| 1 - x / 4 } # => 2
# 8 <= v < 10 になる要素の位置を検索
ary.bsearch_index { |x| 4 - x / 2 } # => nil
//}

@see Array#bsearch...

絞り込み条件を変える

Array#none? -> bool (6107.0)

ブロックを指定しない場合は、 配列のすべての 要素が偽であれば真を返します。そうでなければ偽を返します。

...rn ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
%w{ant bear cat}.none? {|word| word.length == 5} # => true
%w{ant bear cat}.none? {|word| word.length >= 4} # => false
%w{ant bear cat}.none?(/d/) # => true
[].non...
...e? # => true
[nil].none? # => true
[nil,false].none? # => true
[nil, false, true].none? # => false
//}

@see Enumerable#none?...

Array#none? {|obj| ... } -> bool (6107.0)

ブロックを指定しない場合は、 配列のすべての 要素が偽であれば真を返します。そうでなければ偽を返します。

...rn ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
%w{ant bear cat}.none? {|word| word.length == 5} # => true
%w{ant bear cat}.none? {|word| word.length >= 4} # => false
%w{ant bear cat}.none?(/d/) # => true
[].non...
...e? # => true
[nil].none? # => true
[nil,false].none? # => true
[nil, false, true].none? # => false
//}

@see Enumerable#none?...

Array#none?(pattern) -> bool (6107.0)

ブロックを指定しない場合は、 配列のすべての 要素が偽であれば真を返します。そうでなければ偽を返します。

...rn ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
%w{ant bear cat}.none? {|word| word.length == 5} # => true
%w{ant bear cat}.none? {|word| word.length >= 4} # => false
%w{ant bear cat}.none?(/d/) # => true
[].non...
...e? # => true
[nil].none? # => true
[nil,false].none? # => true
[nil, false, true].none? # => false
//}

@see Enumerable#none?...

Comparable#between?(min, max) -> bool (6107.0)

比較演算子 <=> をもとに self が min と max の範囲内(min, max を含みます)にあるかを判断します。

...比較演算子 <=> をもとに self が min と max の範囲内(min, max
を含みます)にあるかを判断します。

以下のコードと同じです。
//emlist[][ruby]{
self >= min and self <= max
//}

@param min 範囲の下端を表すオブジェクトを指定します。

@param m...
...@raise ArgumentError self <=> min か、self <=> max が nil を返
したときに発生します。

//emlist[例][ruby]{
3.between?(1, 5) # => true
6.between?(1, 5) # => false
'cat'.between?('ant', 'dog') # => true
'gnu'.between?('ant', 'dog')...

Enumerable#none? -> bool (6107.0)

ブロックを指定しない場合は、 Enumerable オブジェクトのすべての 要素が偽であれば真を返します。そうでなければ偽を返します。

...ブロックを指定しない場合は、 Enumerable オブジェクトのすべての
要素が偽であれば真を返します。そうでなければ偽を返します。

ブロックを指定した場合は、Enumerable オブジェクトのすべての要素を
ブロックで評価した結...
...Set['ant', 'bear', 'cat'].none? {|word| word.length == 5} # => true
Set['ant', 'bear', 'cat'].none? {|word| word.length >= 4} # => false
Set[].none? # => true
Set[nil].none? # => true
Set[nil,false].none?...
...# => true
Set[nil, false, true].none? # => false
//}...
...tern ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].none? {|word| word.length == 5} # => true
Set['ant', 'bear', 'cat'].none? {|word| word.length >= 4} # => false
Set['ant', 'bear', 'cat'].none?(...
...# => true
Set[].none? # => true
Set[nil].none? # => true
Set[nil,false].none? # => true
Set[nil, false, true].none? # =...
...Set[].none? # => true
Set[nil].none? # => true
Set[nil,false].none? # => true
Set[nil, false, true].none? # => false
//}

@see Array#none?...

絞り込み条件を変える

Enumerable#none? {|obj| ... } -> bool (6107.0)

ブロックを指定しない場合は、 Enumerable オブジェクトのすべての 要素が偽であれば真を返します。そうでなければ偽を返します。

...ブロックを指定しない場合は、 Enumerable オブジェクトのすべての
要素が偽であれば真を返します。そうでなければ偽を返します。

ブロックを指定した場合は、Enumerable オブジェクトのすべての要素を
ブロックで評価した結...
...Set['ant', 'bear', 'cat'].none? {|word| word.length == 5} # => true
Set['ant', 'bear', 'cat'].none? {|word| word.length >= 4} # => false
Set[].none? # => true
Set[nil].none? # => true
Set[nil,false].none?...
...# => true
Set[nil, false, true].none? # => false
//}...
...tern ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].none? {|word| word.length == 5} # => true
Set['ant', 'bear', 'cat'].none? {|word| word.length >= 4} # => false
Set['ant', 'bear', 'cat'].none?(...
...# => true
Set[].none? # => true
Set[nil].none? # => true
Set[nil,false].none? # => true
Set[nil, false, true].none? # =...
...Set[].none? # => true
Set[nil].none? # => true
Set[nil,false].none? # => true
Set[nil, false, true].none? # => false
//}

@see Array#none?...

Enumerable#none?(pattern) -> bool (6107.0)

ブロックを指定しない場合は、 Enumerable オブジェクトのすべての 要素が偽であれば真を返します。そうでなければ偽を返します。

...ブロックを指定しない場合は、 Enumerable オブジェクトのすべての
要素が偽であれば真を返します。そうでなければ偽を返します。

ブロックを指定した場合は、Enumerable オブジェクトのすべての要素を
ブロックで評価した結...
...tern ブロックの代わりに各要素に対して pattern === item を評価します。

//emlist[例][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].none? {|word| word.length == 5} # => true
Set['ant', 'bear', 'cat'].none? {|word| word.length >= 4} # => false
Set['ant', 'bear', 'cat'].none?(...
...# => true
Set[].none? # => true
Set[nil].none? # => true
Set[nil,false].none? # => true
Set[nil, false, true].none? # =...
...Set[].none? # => true
Set[nil].none? # => true
Set[nil,false].none? # => true
Set[nil, false, true].none? # => false
//}

@see Array#none?...
<< 1 2 3 > >>