Sha256: 1c2a07648d61ef1968d78abc009f08ce5b4f6d7aed8035e81a9230a0dbde7e75
Contents?: true
Size: 1.8 KB
Versions: 12
Compression:
Stored size: 1.8 KB
Contents
o:$YARD::CodeObjects::MethodObject: @name:minmax_by:@docstringIC:YARD::Docstring"�Returns two elements array array containing the objects in <i>enum</i> that gives the minimum and maximum values respectively from the given block. a = %w(albatross dog horse) a.minmax_by {|x| x.length } #=> ["dog", "albatross"] :@objectu:YARD::StubProxyEnumerable#minmax_by: @summary0: @all"%Returns two elements array array containing the objects in <i>enum</i> that gives the minimum and maximum values respectively from the given block. a = %w(albatross dog horse) a.minmax_by {|x| x.length } #=> ["dog", "albatross"] @overload minmax_by @yield [ obj] @return [Array]:@ref_tags[: @tags[o:YARD::Tags::OverloadTag ; u;Enumerable#minmax_by;;;IC; " ; u;Enumerable#minmax_by;0; ""@yield [ obj] @return [Array];[;[o:YARD::Tags::Tag ; 0;0:@types["obj: @text":@tag_name" yieldo; ; 0;0;[" Array;";"return;0:@parameters[;0:@signature"minmax_by;" overload:@current_file_has_commentsF:@scope: instance;[:@docstring_extra0:@files[["enum.c0:@namespaceu;Enumerable: @path"Enumerable#minmax_by;[:@visibility:public:@source"}/* * call-seq: * enum.minmax_by {| obj| block } => [min, max] * * Returns two elements array array containing the objects in * <i>enum</i> that gives the minimum and maximum values respectively * from the given block. * * a = %w(albatross dog horse) * a.minmax_by {|x| x.length } #=> ["dog", "albatross"] */ static VALUE enum_minmax_by(obj) VALUE obj; { VALUE memo[4]; RETURN_ENUMERATOR(obj, 0, 0); memo[0] = Qundef; memo[1] = Qundef; memo[2] = Qnil; memo[3] = Qnil; rb_block_call(obj, id_each, 0, 0, minmax_by_i, (VALUE)memo); return rb_assoc_new(memo[2], memo[3]); }:@source_type:c
Version data entries
12 entries across 12 versions & 2 rubygems