%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/cpanel/ea-ruby24/root/usr/share/ri/system/Enumerable/
Upload File :
Create Path :
Current File : //opt/cpanel/ea-ruby24/root/usr/share/ri/system/Enumerable/slice_after-i.ri

U:RDoc::AnyMethod[iI"slice_after:ETI"Enumerable#slice_after;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"6Creates an enumerator for each chunked elements. ;TI"?The ends of chunks are defined by _pattern_ and the block.;To:RDoc::Markup::BlankLineo;
;	[I"PIf <code>_pattern_ === _elt_</code> returns <code>true</code> or the block ;TI"Hreturns <code>true</code> for the element, the element is end of a ;TI"chunk.;T@o;
;	[I"SThe <code>===</code> and _block_ is called from the first element to the last ;TI"element of _enum_.;T@o;
;	[I"DThe result enumerator yields the chunked elements as an array. ;TI"/So +each+ method can be called as follows:;T@o:RDoc::Markup::Verbatim;	[I"2enum.slice_after(pattern).each { |ary| ... }
;TI"8enum.slice_after { |elt| bool }.each { |ary| ... }
;T:@format0o;
;	[I"BOther methods of the Enumerator class and Enumerable module, ;TI"*such as +map+, etc., are also usable.;T@o;
;	[I"GFor example, continuation lines (lines end with backslash) can be ;TI"concatenated as follows:;T@o;;	[I":lines = ["foo\n", "bar\\\n", "baz\n", "\n", "qux\n"]
;TI"*e = lines.slice_after(/(?<!\\)\n\z/)
;TI"p e.to_a
;TI">#=> [["foo\n"], ["bar\\\n", "baz\n"], ["\n"], ["qux\n"]]
;TI"Np e.map {|ll| ll[0...-1].map {|l| l.sub(/\\\n\z/, "") }.join + ll.last }
;TI",#=>["foo\n", "barbaz\n", "\n", "qux\n"];T;
0:
@fileI"enum.c;T:0@omit_headings_from_table_of_contents_below0I"genum.slice_after(pattern)       -> an_enumerator
enum.slice_after { |elt| bool } -> an_enumerator
;T0[I"	(p1);T@1FI"Enumerable;TcRDoc::NormalModule00

Zerion Mini Shell 1.0