るりまサーチ

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

別のキーワード

  1. util u
  2. erb u
  3. matrix u
  4. _builtin koi8_u
  5. encoding koi8_u

ライブラリ

クラス

モジュール

キーワード

検索結果

Enumerable#one? -> bool (21132.0)

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

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

ブロックを指定した場合は、Enumerable オブジェクトの要素を
ブロックで...
...][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set[nil, true, 99].one? # => false
Set[nil, true, false].one? # => true
Set...
...[].one? # => false
//}...
...ます。

//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? # => false
//}...
...# => false
Set[nil, true, false].one? # => true
Set[nil, true, 99].one?(Integer) # => true
Set[].one? # => false
//}

@see Array#one?...

Enumerable#one? {|obj| ... } -> bool (21132.0)

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

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

ブロックを指定した場合は、Enumerable オブジェクトの要素を
ブロックで...
...][ruby]{
require 'set'
Set['ant', 'bear', 'cat'].one? {|word| word.length == 4} # => true
Set['ant', 'bear', 'cat'].one? {|word| word.length > 4} # => false
Set[nil, true, 99].one? # => false
Set[nil, true, false].one? # => true
Set...
...[].one? # => false
//}...
...ます。

//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? # => false
//}...
...# => false
Set[nil, true, false].one? # => true
Set[nil, true, 99].one?(Integer) # => true
Set[].one? # => false
//}

@see Array#one?...

Enumerable#one?(pattern) -> bool (21132.0)

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

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

ブロックを指定した場合は、Enumerable オブジェクトの要素を
ブロックで...
...ます。

//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? # => false
//}...
...# => false
Set[nil, true, false].one? # => true
Set[nil, true, 99].one?(Integer) # => true
Set[].one? # => false
//}

@see Array#one?...

Enumerable#none? -> bool (9101.0)

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

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

ブロックを指定した場合は、Enumerable オブジェクトのすべての要素を
ブロックで評価した結...
...合は true を返します。


//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[].none? # => true
Set[nil].none?...
...# => true
Set[nil,false].none? # => true
Set[nil, false, true].none? # => false
//}...
...ない場合は true を返します。

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

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

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

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

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

ブロックを指定した場合は、Enumerable オブジェクトのすべての要素を
ブロックで評価した結...
...合は true を返します。


//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[].none? # => true
Set[nil].none?...
...# => true
Set[nil,false].none? # => true
Set[nil, false, true].none? # => false
//}...
...ない場合は true を返します。

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

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

絞り込み条件を変える

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

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

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

ブロックを指定した場合は、Enumerable オブジェクトのすべての要素を
ブロックで評価した結...
...ない場合は true を返します。

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

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

Gem::Requirement#none? -> bool (9101.0)

自身が条件を持たない場合は、true を返します。

...自身が条件を持たない場合は、true を返します。

//emlist[][ruby]{
req = Gem::Requirement.new(">= 0")
p req.none? # => true
//}...

REXML::Document#stand_alone? -> String (9101.0)

XML 宣言の standalone の値を文字列で返します。

...XML 宣言の standalone の値を文字列で返します。

//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new(<<EOS)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<e />
EOS
doc.stand_alone? # => "yes"
//}...