⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
Enumerable
/
View File Name :
one%3f-i.ri
U:RDoc::AnyMethod[iI" one?:ETI"Enumerable#one?;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [ I"JPasses each element of the collection to the given block. The method ;TI"Freturns <code>true</code> if the block returns <code>true</code> ;TI"Lexactly once. If the block is not given, <code>one?</code> will return ;TI"H<code>true</code> only if exactly one of the collection members is ;TI" true.;To:RDoc::Markup::BlankLine o; ; [I"BIf instead a pattern is supplied, the method returns whether ;TI"H<code>pattern === element</code> for exactly one collection member.;T@o:RDoc::Markup::Verbatim; [ I"A%w{ant bear cat}.one? { |word| word.length == 4 } #=> true ;TI"B%w{ant bear cat}.one? { |word| word.length > 4 } #=> false ;TI"B%w{ant bear cat}.one? { |word| word.length < 4 } #=> false ;TI"B%w{ant bear cat}.one?(/t/) #=> false ;TI"B[ nil, true, 99 ].one? #=> false ;TI"A[ nil, true, false ].one? #=> true ;TI"A[ nil, true, 99 ].one?(Integer) #=> true ;TI"A[].one? #=> false;T:@format0: @fileI"enum.c;T:0@omit_headings_from_table_of_contents_below0I"cenum.one? [{ |obj| block }] -> true or false enum.one?(pattern) -> true or false ;T0[ I"(*args);T@!FI"Enumerable;TcRDoc::NormalModule00