種類
- インスタンスメソッド (422)
- 文書 (63)
- 特異メソッド (44)
- 定数 (22)
- モジュール関数 (11)
クラス
-
Enumerator
:: Lazy (389) -
Fiddle
:: Handle (33)
モジュール
- Enumerable (33)
- GC (33)
- ObjectSpace (11)
キーワード
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 2
. 2 . 0 (10) -
NEWS for Ruby 2
. 3 . 0 (9) -
NEWS for Ruby 2
. 4 . 0 (8) -
NEWS for Ruby 2
. 5 . 0 (7) -
NEWS for Ruby 2
. 6 . 0 (6) -
NEWS for Ruby 2
. 7 . 0 (5) -
NEWS for Ruby 3
. 0 . 0 (4) -
NEWS for Ruby 3
. 1 . 0 (3) - OPTS (11)
-
RTLD
_ LAZY (11) - chunk (22)
-
chunk
_ while (8) - collect (11)
-
collect
_ concat (11) - compact (3)
- drop (11)
-
drop
_ while (11) - eager (5)
-
enum
_ for (22) - filter (6)
-
filter
_ map (5) -
find
_ all (11) -
flat
_ map (11) - force (11)
-
garbage
_ collect (22) - grep (11)
-
grep
_ v (9) - map (11)
- new (33)
- reject (11)
- select (11)
-
slice
_ after (20) -
slice
_ before (33) -
slice
_ when (10) - start (11)
- sum (22)
- take (11)
-
take
_ while (22) -
to
_ enum (22) - uniq (16)
-
with
_ index (10) - zip (22)
検索結果
先頭5件
-
Enumerator
:: Lazy # select {|item| . . . } -> Enumerator :: Lazy (3242.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... -
Enumerator
:: Lazy # drop(n) -> Enumerator :: Lazy (3241.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.drop(3).take... -
Enumerator
:: Lazy # drop _ while {|item| . . . } -> Enumerator :: Lazy (3241.0) -
Enumerable#drop_while と同じですが、配列ではなくEnumerator::Lazy を返します。
...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, 43, 44, 45... -
Enumerator
:: Lazy # filter _ map {|item| . . . } -> Enumerator :: Lazy (3241.0) -
Enumerable#filter_map と同じですが、配列ではなく Enumerator::Lazy を返します。
...なく Enumerator::Lazy を返します。
@raise ArgumentError ブロックを指定しなかった場合に発生します。
//emlist[例][ruby]{
1.step.lazy.filter_map { |n| n * 2 if n.even? }
# => #<Enumerator::Lazy: #<Enumerator::Lazy: (1.step)>:filter_map>
1.step.lazy.filter_map { |n| n *... -
Enumerator
:: Lazy # reject {|item| . . . } -> Enumerator :: Lazy (3241.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? }.... -
Enumerator
:: Lazy # take(n) -> Enumerator :: Lazy (3241.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 # zip(*lists) -> Enumerator :: Lazy (3241.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>>:z......ip(#<Enumerator: "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 # slice _ before {|elt| bool } -> Enumerator :: Lazy (3237.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...ore と同じですが、配列ではなく 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... -
Enumerator
:: Lazy # slice _ before(initial _ state) {|elt , state| bool } -> Enumerator :: Lazy (3237.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...ore と同じですが、配列ではなく 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... -
Enumerator
:: Lazy # slice _ before(pattern) -> Enumerator :: Lazy (3237.0) -
Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。
...ore と同じですが、配列ではなく 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... -
Enumerator
:: Lazy # chunk {|elt| . . . } -> Enumerator :: Lazy (3236.0) -
Enumerable#chunk と同じですが、配列ではなく Enumerator::Lazy を返します。
...#chunk と同じですが、配列ではなく 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]...