るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.011秒)
トップページ > クエリ:include[x] > モジュール:Enumerable[x]

別のキーワード

  1. _builtin include?
  2. socket mcast_include
  3. dbm include?
  4. sdbm include?
  5. gdbm include?

ライブラリ

キーワード

検索結果

Enumerable#include?(val) -> bool (6114.0)

val と == の関係にある要素を含むとき真を返します。

...val と == の関係にある要素を含むとき真を返します。

@param val 任意のオブジェクト

//emlist[例][ruby]{
[2, 4, 6].include? 2 #=> true
[2, 4, 6].include? 1 #=> false
[2, 4, 6].member? 2 #=> true
[2, 4, 6].member? 1 #=> false
//}...

Enumerable#member?(val) -> bool (3014.0)

val と == の関係にある要素を含むとき真を返します。

...val と == の関係にある要素を含むとき真を返します。

@param val 任意のオブジェクト

//emlist[例][ruby]{
[2, 4, 6].include? 2 #=> true
[2, 4, 6].include? 1 #=> false
[2, 4, 6].member? 2 #=> true
[2, 4, 6].member? 1 #=> false
//}...

Enumerable#each_entry -> Enumerator (7.0)

ブロックを各要素に一度ずつ適用します。

...配列として渡されます。

//emlist[例][ruby]{
class Foo
include
Enumerable
def each
yield 1
yield 1,2
end
end
Foo.new.each_entry{|o| print o, " -- "}
# => 1 -- [1, 2] --
//}

ブロックを省略した場合は Enumerator が返されます。

@see Enumerable#slice_before...

Enumerable#each_entry {|obj| block} -> self (7.0)

ブロックを各要素に一度ずつ適用します。

...配列として渡されます。

//emlist[例][ruby]{
class Foo
include
Enumerable
def each
yield 1
yield 1,2
end
end
Foo.new.each_entry{|o| print o, " -- "}
# => 1 -- [1, 2] --
//}

ブロックを省略した場合は Enumerator が返されます。

@see Enumerable#slice_before...