1104件ヒット
[1101-1104件を表示]
(0.356秒)
種類
- インスタンスメソッド (917)
- 特異メソッド (121)
- モジュール関数 (55)
- クラス (11)
ライブラリ
- ビルトイン (1104)
クラス
モジュール
- Enumerable (215)
- GC (22)
- Kernel (55)
オブジェクト
- ENV (22)
キーワード
- IO (11)
- [] (66)
- []= (22)
- at (11)
-
backtrace
_ locations (22) - binread (11)
-
bit
_ length (17) - bytesplice (6)
- caller (33)
-
caller
_ locations (22) - chunk (11)
-
chunk
_ while (11) - clear (9)
- combination (22)
-
copy
_ stream (22) - empty? (11)
- fill (22)
- max (58)
-
max
_ by (44) - min (58)
-
min
_ by (44) - minmax (42)
-
minmax
_ by (22) - none? (13)
- one? (39)
- permutation (22)
- read (55)
-
repeated
_ combination (22) -
repeated
_ permutation (22) - sample (22)
- size (104)
-
slice
_ before (22) -
slice
_ when (11) -
sort
_ by! (22) - stat (22)
- sum (16)
- truncate (22)
検索結果
-
Enumerable
# one? {|obj| . . . } -> bool (8018.0) -
ブロックを指定しない場合は、 Enumerable オブジェクトの要素のうち ちょうど一つだけが真であれば、真を返します。 そうでなければ偽を返します。
...ttern ブロックの代わりに各要素に対して pattern === item を評価します。
//emlist[例][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set['ant', 'bear', 'cat'].one?(/t....../) # => false
Set[nil, true, 99].one? # => false
Set[nil, true, false].one? # => true
Set[nil, true, 99].one?(Integer) # => true
Set[].one? #...