種類
- インスタンスメソッド (493)
- クラス (31)
- 特異メソッド (12)
ライブラリ
- ビルトイン (536)
クラス
-
Enumerator
:: ArithmeticSequence (21) -
Enumerator
:: Lazy (274) - Integer (72)
- Numeric (93)
- Range (45)
キーワード
- % (14)
- == (7)
- ArithmeticSequence (7)
- Lazy (12)
- Numeric (12)
- chunk (24)
- collect (12)
- downto (24)
- drop (12)
-
drop
_ while (12) - filter (7)
-
filter
_ map (6) -
find
_ all (12) - force (12)
- hash (7)
- map (12)
- new (12)
- reject (12)
- select (12)
-
slice
_ after (22) -
slice
_ before (36) -
slice
_ when (11) - take (12)
-
take
_ while (24) - times (24)
- upto (24)
- zip (24)
検索結果
先頭5件
-
Enumerator
:: Lazy # find _ all {|item| . . . } -> Enumerator :: Lazy (8018.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...r ブロックを指定しなかった場合に発生します。
//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]
//}... -
Enumerator
:: Lazy # map {|item| . . . } -> Enumerator :: Lazy (8018.0) -
Enumerable#map と同じですが、配列ではなくEnumerator::Lazy を返します。
...Error ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.map{ |n| n % 3 == 0 }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:map>
1.step.lazy.collect{ |n| n.succ }.take(10).force
# => [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
//}
@see Enu... -
Enumerator
:: Lazy # reject {|item| . . . } -> Enumerator :: Lazy (8018.0) -
Enumerable#reject と同じですが、配列ではなくEnumerator::Lazy を返します。
...ror ブロックを指定しなかった場合に発生します。
//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]
//}
@s... -
Enumerator
:: Lazy # select {|item| . . . } -> Enumerator :: Lazy (8018.0) -
Enumerable#select と同じですが、配列ではなくEnumerator::Lazy を返します。
...r ブロックを指定しなかった場合に発生します。
//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]
//}... -
Enumerator
:: Lazy # take(n) -> Enumerator :: Lazy (8018.0) -
Enumerable#take と同じですが、配列ではなくEnumerator::Lazy を返します。
...数を指定します。
@raise ArgumentError 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 # take _ while -> Enumerator :: Lazy (8018.0) -
Enumerable#take_while と同じですが、配列ではなく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'..'z').cycle).take_while { |e|... -
Enumerator
:: Lazy # take _ while {|item| . . . } -> Enumerator :: Lazy (8018.0) -
Enumerable#take_while と同じですが、配列ではなく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'..'z').cycle).take_while { |e|... -
Enumerator
:: Lazy # zip(*lists) -> Enumerator :: Lazy (8018.0) -
Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。
...は Enumerable#zip と
同じ挙動になります。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "a".."z":cycle>)>
1.step.lazy.zip(('a'..'z').cycle).take(30).force.last(6)
# => [[25, "y"], [26, "z"],... -
Enumerator
:: Lazy # zip(*lists) {|v1 , v2 , . . . | . . . } -> nil (8018.0) -
Enumerable#zip と同じですが、配列ではなくEnumerator::Lazy を返します。
...は Enumerable#zip と
同じ挙動になります。
//emlist[例][ruby]{
1.step.lazy.zip(('a'..'z').cycle)
# => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:step>>:zip(#<Enumerator: "a".."z":cycle>)>
1.step.lazy.zip(('a'..'z').cycle).take(30).force.last(6)
# => [[25, "y"], [26, "z"],...