るりまサーチ

最速Rubyリファレンスマニュアル検索!
1104件ヒット [1101-1104件を表示] (0.356秒)
トップページ > クエリ:t[x] > クエリ:_builtin[x] > クエリ:length[x]

別のキーワード

  1. _builtin new
  2. _builtin inspect
  3. _builtin []
  4. _builtin to_s
  5. _builtin each

ライブラリ

クラス

モジュール

オブジェクト

キーワード

検索結果

<< < ... 10 11 12 >>

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? #...
<< < ... 10 11 12 >>