📁 File Manager Pro
v10.0.3 | PHP: 8.1.34
Server: Apache
2026-06-22 08:03:07
📂
/ (Root)
/
opt
/
alt
/
ruby33
/
share
/
ri
/
system
/
Array
📍 /opt/alt/ruby33/share/ri/system/Array
🔄 Refresh
✏️
Editing: count-i.ri
Read Only
U:RDoc::AnyMethod[iI" count:ETI"Array#count;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"+Returns a count of specified elements.;To:RDoc::Markup::BlankLine o; ; [I"FWith no argument and no block, returns the count of all elements:;T@o:RDoc::Markup::Verbatim; [I"[0, 1, 2].count # => 3 ;TI"[].count # => 0 ;T:@format0o; ; [I"MWith argument +obj+, returns the count of elements <tt>==</tt> to +obj+:;T@o;; [I"$[0, 1, 2, 0.0].count(0) # => 2 ;TI"[0, 1, 2].count(3) # => 0 ;T; 0o; ; [I"LWith no argument and a block given, calls the block with each element; ;TI"Nreturns the count of elements for which the block returns a truthy value:;T@o;; [I"7[0, 1, 2, 3].count {|element| element > 1} # => 2 ;T; 0o; ; [I"QWith argument +obj+ and a block given, issues a warning, ignores the block, ;TI"<and returns the count of elements <tt>==</tt> to +obj+.;T: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"iarray.count -> an_integer array.count(obj) -> an_integer array.count {|element| ... } -> an_integer ;T0[ I"(*args);T@(FI" Array;TcRDoc::NormalClass00
💾 Save Changes
❌ Cancel