⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.13
Server IP:
109.199.105.153
Server:
Linux connect.inboxifs.com 5.15.0-152-generic #162-Ubuntu SMP Wed Jul 23 09:48:42 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Enumerator
/
Lazy
/
View File Name :
to_enum-i.ri
U:RDoc::AnyMethod[iI"to_enum:ETI"Enumerator::Lazy#to_enum;TF:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"ESimilar to Object#to_enum, except it returns a lazy enumerator. ;TI"?This makes it easy to define Enumerable methods that will ;TI"<naturally remain lazy if called from a lazy enumerator.;To:RDoc::Markup::BlankLine o; ; [I"@For example, continuing from the example in Object#to_enum:;T@o:RDoc::Markup::Verbatim; [ I"7# See Object#to_enum for the definition of repeat ;TI"r = 1..Float::INFINITY ;TI"/r.repeat(2).first(5) # => [1, 1, 2, 2, 3] ;TI"'r.repeat(2).class # => Enumerator ;TI"=r.repeat(2).map{|n| n ** 2}.first(5) # => endless loop! ;TI"+# works naturally on lazy enumerator: ;TI"2r.lazy.repeat(2).class # => Enumerator::Lazy ;TI"Cr.lazy.repeat(2).map{|n| n ** 2}.first(5) # => [1, 1, 4, 4, 9];T:@format0: @fileI"enumerator.c;T:0@omit_headings_from_table_of_contents_below0I"lzy.to_enum(method = :each, *args) -> lazy_enum lzy.enum_for(method = :each, *args) -> lazy_enum lzy.to_enum(method = :each, *args) {|*args| block } -> lazy_enum lzy.enum_for(method = :each, *args) {|*args| block } -> lazy_enum ;T0[[I" enum_for;T@ I"(*args);T@FI" Lazy;TcRDoc::NormalClass00