種類
- インスタンスメソッド (239)
- クラス (11)
- 特異メソッド (11)
ライブラリ
- ビルトイン (261)
クラス
-
Enumerator
:: Lazy (250)
キーワード
- Lazy (11)
- chunk (22)
- collect (11)
- drop (11)
-
drop
_ while (11) - filter (6)
-
filter
_ map (5) -
find
_ all (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 # select {|item| . . . } -> Enumerator :: Lazy (3160.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|......i.even? }.take(10).force
# => [2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
//}
@see Enumerable#select... -
Enumerator
:: Lazy # drop(n) -> Enumerator :: Lazy (3159.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......p(3).take(10).force
# => [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
//}
@see Enumerable#drop... -
Enumerator
:: Lazy # drop _ while {|item| . . . } -> Enumerator :: Lazy (3159.0) -
Enumerable#drop_while と同じですが、配列ではなくEnumerator::Lazy を返します。
...同じですが、配列ではなく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, 43, 44, 45, 46, 47, 48,... -
Enumerator
:: Lazy # reject {|item| . . . } -> Enumerator :: Lazy (3159.0) -
Enumerable#reject と同じですが、配列ではなくEnumerator::Lazy を返します。
...配列ではなくEnumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.reject { |i| i.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:reject>
1.step.lazy.reject { |i| i.......even? }.take(10).force
# => [1, 3, 5, 7, 9, 11, 13, 15, 17, 19]
//}
@see Enumerable#reject... -
Enumerator
:: Lazy # take(n) -> Enumerator :: Lazy (3159.0) -
Enumerable#take と同じですが、配列ではなくEnumerator::Lazy を返します。
...Enumerable#take と同じですが、配列ではなくEnumerator::Lazy を返します。
n が大きな数 (100000とか) の場合に備えて再定義されています。
配列が必要な場合は Enumerable#first を使って下さい。
@param n 要素数を指定します。
@raise Arg......umentError n に負の数を指定した場合に発生します。
//emlist[例][ruby]{
1.step.lazy.take(5)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:take(5)>
1.step.lazy.take(5).force
# => [1, 2, 3, 4, 5]
//}
@see Enumerable#take... -
Enumerator
:: Lazy # slice _ before {|elt| bool } -> Enumerator :: Lazy (3155.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...が、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5], [6... -
Enumerator
:: Lazy # slice _ before(initial _ state) {|elt , state| bool } -> Enumerator :: Lazy (3155.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...が、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5], [6... -
Enumerator
:: Lazy # slice _ before(pattern) -> Enumerator :: Lazy (3155.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...が、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.slice_before { |e| e.even? }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x00007f9f31844ce8>:each>>
1.step.lazy.slice_before { |e| e % 3 == 0 }.take(5).force
# => [[1, 2], [3, 4, 5], [6... -
Enumerator
:: Lazy # chunk {|elt| . . . } -> Enumerator :: Lazy (3154.0) -
Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。
...じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.chunk{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007f8bf18118f0>:each>>
1.step.lazy.chunk{ |n| n % 3 == 0 }.take(5).force
# => [[false, [1, 2]], [true, [3]... -
Enumerator
:: Lazy # chunk(initial _ state) {|elt , state| . . . } -> Enumerator :: Lazy (3154.0) -
Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。
...じですが、配列ではなく Enumerator::Lazy を返します。
//emlist[例][ruby]{
1.step.lazy.chunk{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator: #<Enumerator::Generator:0x007f8bf18118f0>:each>>
1.step.lazy.chunk{ |n| n % 3 == 0 }.take(5).force
# => [[false, [1, 2]], [true, [3]...