Sha256: 7ee1055bbdf4f92b988d3079e1b06a41ec1bd3ec1f5011beabdcb8a32a7af745
Contents?: true
Size: 1.61 KB
Versions: 12
Compression:
Stored size: 1.61 KB
Contents
o:$YARD::CodeObjects::MethodObject: @name:take_while:@docstringIC:YARD::Docstring"�Passes elements to the block until the block returns nil or false, then stops iterating and returns an array of all prior elements. a = [1, 2, 3, 4, 5, 0] a.take_while {|i| i < 3 } # => [1, 2] :@objectu:YARD::StubProxyEnumerable#take_while: @summary0: @all"Passes elements to the block until the block returns nil or false, then stops iterating and returns an array of all prior elements. a = [1, 2, 3, 4, 5, 0] a.take_while {|i| i < 3 } # => [1, 2] @overload take_while @yield [arr] @return [Array]:@ref_tags[: @tags[o:YARD::Tags::OverloadTag ; u;Enumerable#take_while;;;IC; " ; u;Enumerable#take_while;0; "!@yield [arr] @return [Array];[;[o:YARD::Tags::Tag ; 0;0:@types["arr: @text":@tag_name" yieldo; ; 0;0;[" Array;";"return;0:@parameters[;0:@signature"take_while;" overload:@current_file_has_commentsF:@scope: instance;[:@docstring_extra0:@files[["enum.c0:@namespaceu;Enumerable: @path"Enumerable#take_while;[:@visibility:public:@source"�/* * call-seq: * enum.take_while {|arr| block } => array * * Passes elements to the block until the block returns nil or false, * then stops iterating and returns an array of all prior elements. * * a = [1, 2, 3, 4, 5, 0] * a.take_while {|i| i < 3 } # => [1, 2] * */ static VALUE enum_take_while(obj) VALUE obj; { VALUE ary; RETURN_ENUMERATOR(obj, 0, 0); ary = rb_ary_new(); rb_block_call(obj, id_each, 0, 0, take_while_i, (VALUE)&ary); return ary; }:@source_type:c
Version data entries
12 entries across 12 versions & 2 rubygems