D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Enumerable
/
Filename :
select-i.ri
back
Copy
U:RDoc::AnyMethod[iI"select:ETI"Enumerable#select;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"@Returns an array containing elements selected by the block.;To:RDoc::Markup::BlankLine o; ; [I"CWith a block given, calls the block with successive elements; ;TI"Sreturns an array of those elements for which the block returns a truthy value:;T@o:RDoc::Markup::Verbatim; [I"C(0..9).select {|element| element % 3 == 0 } # => [0, 3, 6, 9] ;TI"Na = {foo: 0, bar: 1, baz: 2}.select {|key, value| key.start_with?('b') } ;TI"a # => {:bar=>1, :baz=>2} ;T:@format0o; ; [I"0With no block given, returns an Enumerator.;T@o; ; [I"Related: #reject.;T: @fileI"enum.c;T:0@omit_headings_from_table_of_contents_below000[ I"();T@FI"Enumerable;TcRDoc::NormalModule0[@!FI" find_all;T