Method: Rupture::Sequence#split_with
- Defined in:
- lib/rupture/sequence.rb
#split_with(p = nil, &pred) ⇒ Object
128 129 130 131 |
# File 'lib/rupture/sequence.rb', line 128 def split_with(p = nil, &pred) pred ||= p [take_while(pred), drop_while(pred)] end |