るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

クラス

キーワード

検索結果

<< < ... 203 204 205 >>

Regexp#==(other) -> bool (113.0)

otherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。

...otherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。

@
param other 正規表現を指定します。

//emlist[例][ruby]{
p /^eee$/ == /~eee$/x # => false
p /^eee$/ == /~eee$/i # => false
p /^eee$/e == /~eee$/u # => false
p /^...
...eee$/ == Regexp.new("^eee$") # => true
p /^eee$/.eql?(/^eee$/) # => true
//}...

Regexp#eql?(other) -> bool (113.0)

otherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。

...otherが同じパターン、オプション、文字コードの正規表現であったらtrueを返します。

@
param other 正規表現を指定します。

//emlist[例][ruby]{
p /^eee$/ == /~eee$/x # => false
p /^eee$/ == /~eee$/i # => false
p /^eee$/e == /~eee$/u # => false
p /^...
...eee$/ == Regexp.new("^eee$") # => true
p /^eee$/.eql?(/^eee$/) # => true
//}...

Symbol#name -> String (113.0)

シンボルに対応する文字列を返します。

...シンボルに対応する文字列を返します。

Symbol#to_sと違って freeze された文字列を返します。

//emlist[][ruby]{
p :fred.name # => "fred"
p :fred.name.frozen? # => true
p :fred.to_s # => "fred"
p :fred.to_s.frozen? # => false
//}

@
see Symbol#to_s...

Array#all? -> bool (25.0)

すべての要素が真である場合に true を返します。 偽である要素があれば、ただちに false を返します。

...べての要素が真である場合に true を返します。
偽である要素があれば、ただちに false を返します。

ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が真である場合に true を返します。ブロックが...
...の数が 0 である配列に対しては true を返します。

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

//emlist[例][ruby]{
# すべて正の数か?
p [5, 6, 7].all? {|v| v > 0 } # => true
p [5, -1, 7].all? {|v| v > 0 } # =>...
...false
p [].all? {|v| v > 0 } # => true
p %w[ant bear cat].all?(/t/) # => false
p [1, 2, 3].all?(Integer) # => true
p [1, 2, 3.0].all?(Integer) # => false
//}

@
see Enumerable#all?...

Array#one? -> bool (25.0)

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

...します。

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

//emlist[例][ruby]{
%w{ant bear cat}.one? {|word| word.length == 4} # => true
%w{ant bear cat}.one? {|word| word.length > 4} # => false
%w{ant bear cat}.one?(/t/)...
...# => false
[ nil, true, 99 ].one? # => false
[ nil, true, false ].one? # => true
[ nil, true, 99 ].one?(Integer) # => true
[].one? # => false
//}

@
see Enumerable#one?...

絞り込み条件を変える

Array#one? {|obj| ... } -> bool (25.0)

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

...します。

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

//emlist[例][ruby]{
%w{ant bear cat}.one? {|word| word.length == 4} # => true
%w{ant bear cat}.one? {|word| word.length > 4} # => false
%w{ant bear cat}.one?(/t/)...
...# => false
[ nil, true, 99 ].one? # => false
[ nil, true, false ].one? # => true
[ nil, true, 99 ].one?(Integer) # => true
[].one? # => false
//}

@
see Enumerable#one?...

Enumerable#all? -> bool (25.0)

すべての要素が真である場合に true を返します。 偽である要素があれば、ただちに false を返します。

...べての要素が真である場合に true を返します。
偽である要素があれば、ただちに false を返します。

ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が真である場合に true を返します。ブロックが...
... true を返します。

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

//emlist[例][ruby]{
require 'set'

# すべて正の数か?
p Set[5, 6, 7].all? {|v| v > 0 } # => true
p Set[5, -1, 7].all? {|v| v > 0 } # => false
p Set[]....
...all? {|v| v > 0 } # => true

p Set['ant', 'bear', 'cat'].all?(/t/) # => false
p (1..4).all?(Integer) # => true
p [1, 2, 3].all?(Integer) # => true
p [1, 2, 3.0].all?(Integer) # => false
# Hashは[k, v]のペアなのでArray/Hash === [k, v]で評...

Enumerable#one? -> bool (25.0)

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

...す。

@
param pattern ブロックの代わりに各要素に対して 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?...
...# => false
//}

@
see Array#one?...

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

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

...す。

@
param pattern ブロックの代わりに各要素に対して 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?...
...# => false
//}

@
see Array#one?...

Enumerable#all? -> bool (19.0)

すべての要素が真である場合に true を返します。 偽である要素があれば、ただちに false を返します。

...べての要素が真である場合に true を返します。
偽である要素があれば、ただちに false を返します。

ブロックを伴う場合は、各要素に対してブロックを評価し、すべての結果
が真である場合に true を返します。ブロックが...
... true を返します。

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

//emlist[例][ruby]{
require 'set'

# すべて正の数か?
p Set[5, 6, 7].all? {|v| v > 0 } # => true
p Set[5, -1, 7].all? {|v| v > 0 } # => false
p Set[]....
...all? {|v| v > 0 } # => true

p Set['ant', 'bear', 'cat'].all?(/t/) # => false
p (1..4).all?(Integer) # => true
p [1, 2, 3].all?(Integer) # => true
p [1, 2, 3.0].all?(Integer) # => false
# Hashは[k, v]のペアなのでArray/Hash === [k, v]で評...

絞り込み条件を変える

Enumerable#one? -> bool (19.0)

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

...す。

@
param pattern ブロックの代わりに各要素に対して 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?...

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

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

...す。

@
param pattern ブロックの代わりに各要素に対して 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?...

Module#freeze -> self (19.0)

モジュールを凍結(内容の変更を禁止)します。

...

凍結したモジュールにメソッドの追加など何らかの変更を加えようとした場合に
FrozenError
が発生します。

@
see Object#freeze

//emlist[例][ruby]{
module Foo; end
Foo.freeze

module Foo
def foo; end
end # => FrozenError: can't modify frozen module
//}...
<< < ... 203 204 205 >>