Sha256: 6262e54aab59eeb19fce8504257d8c4a81ff1b54d56e4d7069b82489de2f68af
Contents?: true
Size: 1.61 KB
Versions: 12
Compression:
Stored size: 1.61 KB
Contents
o:$YARD::CodeObjects::MethodObject: @name: group_by:@docstringIC:YARD::Docstring"�Returns a hash, which keys are evaluated result from the block, and values are arrays of elements in <i>enum</i> corresponding to the key. (1..6).group_by {|i| i%3} #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]} :@objectu:YARD::StubProxyEnumerable#group_by: @summary0: @all"Returns a hash, which keys are evaluated result from the block, and values are arrays of elements in <i>enum</i> corresponding to the key. (1..6).group_by {|i| i%3} #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]} @overload group_by @yield [ obj ] @return [Hash]:@ref_tags[: @tags[o:YARD::Tags::OverloadTag ; u;Enumerable#group_by;;;IC; " ; u;Enumerable#group_by;0; ""@yield [ obj ] @return [Hash];[;[o:YARD::Tags::Tag ; 0;0:@types["obj: @text":@tag_name" yieldo; ; 0;0;[" Hash;";"return;0:@parameters[;0:@signature" group_by;" overload:@current_file_has_commentsF:@scope: instance;[:@docstring_extra0:@files[["enum.c0:@namespaceu;Enumerable: @path"Enumerable#group_by;[:@visibility:public:@source"�/* * call-seq: * enum.group_by {| obj | block } => a_hash * * Returns a hash, which keys are evaluated result from the * block, and values are arrays of elements in <i>enum</i> * corresponding to the key. * * (1..6).group_by {|i| i%3} #=> {0=>[3, 6], 1=>[1, 4], 2=>[2, 5]} * */ static VALUE enum_group_by(obj) VALUE obj; { VALUE hash; RETURN_ENUMERATOR(obj, 0, 0); hash = rb_hash_new(); rb_block_call(obj, id_each, 0, 0, group_by_i, hash); return hash; }:@source_type:c
Version data entries
12 entries across 12 versions & 2 rubygems