るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.013秒)
トップページ > クラス:Enumerator::Lazy[x] > クエリ:Enumerable#slice_before[x]

別のキーワード

  1. << rexml::attribute#name
  2. add rexml::attribute#name
  3. handle_interrupt thread#raise
  4. inspect? irb::context#inspect_mode
  5. service drb::extserv#stop_service

ライブラリ

検索結果

Enumerator::Lazy#slice_before {|elt| bool } -> Enumerator::Lazy (23.0)

Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

...
Enumerable#slice_before
と同じですが、配列ではなく 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 }.t...
...ake(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}

@see Enumerable#slice_before...

Enumerator::Lazy#slice_before(initial_state) {|elt, state| bool } -> Enumerator::Lazy (23.0)

Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

...
Enumerable#slice_before
と同じですが、配列ではなく 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 }.t...
...ake(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}

@see Enumerable#slice_before...

Enumerator::Lazy#slice_before(pattern) -> Enumerator::Lazy (23.0)

Enumerable#slice_before と同じですが、配列ではなく Enumerator::Lazy を返します。

...
Enumerable#slice_before
と同じですが、配列ではなく 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 }.t...
...ake(5).force
# => [[1, 2], [3, 4, 5], [6, 7, 8], [9, 10, 11], [12, 13, 14]]
//}

@see Enumerable#slice_before...