Sha256: 1e718b3a0a5a112780c6837f69c1d1a9cd43204eac0cb4110bdf62d6524270f4

Contents?: true

Size: 1.54 KB

Versions: 16

Compression:

Stored size: 1.54 KB

Contents

o:$YARD::CodeObjects::MethodObject:
@name:length:@docstringIC:YARD::Docstring"ēReturns the number of key-value pairs in the hash.

   h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
   h.length        #=> 4
   h.delete("a")   #=> 200
   h.length        #=> 3
:@objectu:YARD::StubProxyHash#length:
@summary0:	@all"Returns the number of key-value pairs in the hash.

   h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
   h.length        #=> 4
   h.delete("a")   #=> 200
   h.length        #=> 3


@overload length
  @return [Fixnum]
@overload size
  @return [Fixnum]:@ref_tags[:
@tags[o:YARD::Tags::OverloadTag
;
u;Hash#length;;;IC;	"
;
u;Hash#length;0;
"@return [Fixnum];[;[o:YARD::Tags::Tag
;
0;0:@types["Fixnum:
@text":@tag_name"return;0:@parameters[;0:@signature"length;"
overloado;
;
u;Hash#length;:	size;IC;	"
;
u;Hash#length;0;
"@return [Fixnum];[;[o;
;
0;0;["Fixnum;";"return;0;[;0;"	size;"
overload:@current_file_has_commentsF:@scope:
instance;[:@docstring_extra0:@files[["hash.c0:@namespaceu;	Hash:
@path"Hash#length;[:@visibility:public:@source"/*
 *  call-seq:
 *     hsh.length    =>  fixnum
 *     hsh.size      =>  fixnum
 *
 *  Returns the number of key-value pairs in the hash.
 *
 *     h = { "d" => 100, "a" => 200, "v" => 300, "e" => 400 }
 *     h.length        #=> 4
 *     h.delete("a")   #=> 200
 *     h.length        #=> 3
 */

static VALUE
rb_hash_size(hash)
    VALUE hash;
{
    return INT2FIX(RHASH(hash)->tbl->num_entries);
}:@source_type:c

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
pry-doc-0.5.1 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.5.0 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.4.6 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.4.5 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.4.4 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.4.3 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.4.2 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.4.1 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.4.0 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.3.0 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.2.4pre1 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.2.3pre1 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.2.1 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.2.0 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-doc-0.1.5pre1 lib/pry-doc/core_docs_18/objects/Hash/length_i.dat
pry-0.6.9pre1-i386-mingw32 lib/pry/core_docs_18/objects/Hash/length_i.dat