Sha256: c4fd3a9213fe91731d4acea8b7d5469bc663e49ae2d4cf69a88aa2932f9ca76f

Contents?: true

Size: 1.48 KB

Versions: 12

Compression:

Stored size: 1.48 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:max_by:@docstringIC:YARD::Docstring"�Returns the object in <i>enum</i> that gives the maximum
value from the given block.

   a = %w(albatross dog horse)
   a.max_by {|x| x.length }   #=> "albatross"
:@objectu:YARD::StubProxyEnumerable#max_by:
@summary0:	@all"�Returns the object in <i>enum</i> that gives the maximum
value from the given block.

   a = %w(albatross dog horse)
   a.max_by {|x| x.length }   #=> "albatross"


@overload max_by
  @yield [ obj]
  @return [Object]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Enumerable#max_by;;;IC;	"
;
u;Enumerable#max_by;0;
"#@yield [ obj]
@return [Object];[;[o:YARD::Tags::Tag
;
0;0:@types["obj:
@text":@tag_name"
yieldo;
;
0;0;["Object;";"return;0:@parameters[;0:@signature"max_by;"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["enum.c0:@namespaceu;Enumerable:
@path"Enumerable#max_by;[:@visibility:public:@source"�/*
 *  call-seq:
 *     enum.max_by {| obj| block }   => obj
 *
 *  Returns the object in <i>enum</i> that gives the maximum
 *  value from the given block.
 *
 *     a = %w(albatross dog horse)
 *     a.max_by {|x| x.length }   #=> "albatross"
 */

static VALUE
enum_max_by(obj)
    VALUE obj;
{
    VALUE memo[2];

    RETURN_ENUMERATOR(obj, 0, 0);

    memo[0] = Qundef;
    memo[1] = Qnil;
    rb_block_call(obj, id_each, 0, 0, max_by_i, (VALUE)memo);
    return memo[1];
}:@source_type:c

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Enumerable/max_by_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Enumerable/max_by_i.dat