種類
- インスタンスメソッド (239)
- 特異メソッド (11)
ライブラリ
- ビルトイン (250)
キーワード
- chunk (22)
- collect (11)
- drop (11)
-
drop
_ while (11) - filter (6)
-
filter
_ map (5) -
find
_ all (11) - force (11)
- map (11)
- new (11)
- reject (11)
- select (11)
-
slice
_ after (20) -
slice
_ before (33) -
slice
_ when (10) - take (11)
-
take
_ while (22) - zip (22)
検索結果
先頭5件
-
Enumerator
:: Lazy # take _ while -> Enumerator :: Lazy (3167.0) -
Enumerable#take_while と同じですが、配列ではなくEnumerator::Lazy を返します。
...ではなくEnumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle).take_while { |e| e.first < 100_000 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "a".."z":cycle>)>:take_while>
1.step.lazy.zip(('a'..... -
Enumerator
:: Lazy # take _ while {|item| . . . } -> Enumerator :: Lazy (3167.0) -
Enumerable#take_while と同じですが、配列ではなくEnumerator::Lazy を返します。
...ではなくEnumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle).take_while { |e| e.first < 100_000 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "a".."z":cycle>)>:take_while>
1.step.lazy.zip(('a'..... -
Enumerator
:: Lazy # zip(*lists) -> Enumerator :: Lazy (3160.0) -
Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。
...なくEnumerator::Lazy を返します。
ただし一貫性のため、ブロック付きで呼び出した場合は Enumerable#zip と
同じ挙動になります。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<E......numerator: "a".."z":cycle>)>
1.step.lazy.zip(('a'..'z').cycle).take(30).force.last(6)
# => [[25, "y"], [26, "z"], [27, "a"], [28, "b"], [29, "c"], [30, "d"]]
//}
@see Enumerable#zip... -
Enumerator
:: Lazy # filter {|item| . . . } -> Enumerator :: Lazy (3156.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i|... -
Enumerator
:: Lazy # find _ all {|item| . . . } -> Enumerator :: Lazy (3156.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i|... -
Enumerator
:: Lazy # select {|item| . . . } -> Enumerator :: Lazy (3156.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i|... -
Enumerator
:: Lazy # collect {|item| . . . } -> Enumerator :: Lazy (3155.0) -
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
...、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.map{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:map>
1.step.lazy.collect{ |n| n.... -
Enumerator
:: Lazy # find _ all {|item| . . . } -> Enumerator :: Lazy (3155.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i|... -
Enumerator
:: Lazy # map {|item| . . . } -> Enumerator :: Lazy (3155.0) -
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
...、配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.map{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:map>
1.step.lazy.collect{ |n| n.... -
Enumerator
:: Lazy # select {|item| . . . } -> Enumerator :: Lazy (3155.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.find_all { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:find_all>
1.step.lazy.select { |i|... -
Enumerator
:: Lazy # drop(n) -> Enumerator :: Lazy (3154.0) -
Enumerable#drop と同じですが、配列ではなくEnumerator::Lazy を返します。
...はなくEnumerator::Lazy を返します。
@param n 要素数を指定します。
@raise ArgumentError n に負の数を指定した場合に発生します。
//emlist[例][ruby]{
1.step.lazy.drop(3)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:drop(3)>
1.step.lazy.dro... -
Enumerator
:: Lazy # drop _ while {|item| . . . } -> Enumerator :: Lazy (3154.0) -
Enumerable#drop_while と同じですが、配列ではなくEnumerator::Lazy を返します。
...umerable#drop_while と同じですが、配列ではなくEnumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.drop_while { |i| i < 42 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:drop_while>
1.step.lazy.drop_while { |i| i < 42 }.take(10).force
# => [42, 4...