Linux server1.dn-server.com 4.18.0-553.89.1.lve.el8.x86_64 #1 SMP Wed Dec 10 13:58:50 UTC 2025 x86_64
LiteSpeed
Server IP : 195.201.204.189 & Your IP : 216.73.216.37
Domains :
Cant Read [ /etc/named.conf ]
User : beriska1
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
alt /
ruby19 /
share /
ri /
1.9.1 /
system /
Enumerator /
Delete
Unzip
Name
Size
Permission
Date
Action
Generator
[ DIR ]
drwxr-xr-x
2026-05-01 04:24
Yielder
[ DIR ]
drwxr-xr-x
2026-05-01 04:24
cdesc-Enumerator.ri
3.11
KB
-rw-r--r--
2023-07-26 17:26
each-i.ri
319
B
-rw-r--r--
2023-07-26 17:26
each_with_index-i.ri
452
B
-rw-r--r--
2023-07-26 17:26
each_with_object-i.ri
872
B
-rw-r--r--
2023-07-26 17:26
feed-i.ri
956
B
-rw-r--r--
2023-07-26 17:26
inspect-i.ri
255
B
-rw-r--r--
2023-07-26 17:26
new-c.ri
1.25
KB
-rw-r--r--
2023-07-26 17:26
next-i.ri
830
B
-rw-r--r--
2023-07-26 17:26
next_values-i.ri
1.45
KB
-rw-r--r--
2023-07-26 17:26
peek-i.ri
710
B
-rw-r--r--
2023-07-26 17:26
peek_values-i.ri
888
B
-rw-r--r--
2023-07-26 17:26
rewind-i.ri
367
B
-rw-r--r--
2023-07-26 17:26
with_index-i.ri
636
B
-rw-r--r--
2023-07-26 17:26
with_object-i.ri
862
B
-rw-r--r--
2023-07-26 17:26
Save
Rename
U:RDoc::NormalClass[iI"Enumerator:ET@I"Object;Fo:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[I"?A class which allows both internal and external iteration.;To:RDoc::Markup::BlankLine o; ;[I";An Enumerator can be created by the following methods.;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0;[o; ;[I"Kernel#to_enum;To;;0;[o; ;[I"Kernel#enum_for;To;;0;[o; ;[I"Enumerator.new;T@o; ;[I"AMost methods have two forms: a block form where the contents;TI"Iare evaluated for each item in the enumeration, and a non-block form;TI";which returns a new Enumerator wrapping the iteration.;T@o:RDoc::Markup::Verbatim;[I")enumerator = %w(one two three).each ;FI"+puts enumerator.class # => Enumerator ;FI"6enumerator.each_with_object("foo") do |item,obj| ;FI" puts "#{obj}: #{item}" ;FI" end ;FI"# foo: one ;FI"# foo: two ;FI"# foo: three ;FI"8enum_with_obj = enumerator.each_with_object("foo") ;FI".puts enum_with_obj.class # => Enumerator ;FI"&enum_with_obj.each do |item,obj| ;FI" puts "#{obj: #{item}" ;FI" end ;FI"# foo: one ;FI"# foo: two ;FI"# foo: three ;Fo; ;[I"EThis allows you to chain Enumerators together. For example, you;TI">can map a list's elements to strings containing the index;TI"%and the element as a string via:;T@o;;[I">puts %w[foo bar baz].map.with_index {|w,i| "#{i}:#{w}" } ;FI"&# => ["0:foo", "1:bar", "2:baz"] ;Fo; ;[I"<An Enumerator can also be used as an external iterator.;TI"HFor example, Enumerator#next returns the next value of the iterator;TI"=or raises StopIteration if the Enumerator is at the end.;T@o;;[ I"8e = [1,2,3].each # returns an enumerator object. ;FI"puts e.next # => 1 ;FI"puts e.next # => 2 ;FI"puts e.next # => 3 ;FI"*puts e.next # raises StopIteration ;Fo; ;[I"CYou can use this to implement an internal iterator as follows:;T@o;;["I"def ext_each(e) ;FI" while true ;FI" begin ;FI" vs = e.next_values ;FI" rescue StopIteration ;FI" return $!.result ;FI" end ;FI" y = yield(*vs) ;FI" e.feed y ;FI" end ;FI" end ;FI" ;FI"o = Object.new ;FI" ;FI"def o.each ;FI" puts yield ;FI" puts yield(1) ;FI" puts yield(1, 2) ;FI" 3 ;FI" end ;FI" ;FI"4# use o.each as an internal iterator directly. ;FI"*puts o.each {|*x| puts x; [:b, *x] } ;FI"8# => [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3 ;FI" ;FI"2# convert o.each to an external iterator for ;FI"*# implementing an internal iterator. ;FI"7puts ext_each(o.to_enum) {|*x| puts x; [:b, *x] } ;FI"7# => [], [:b], [1], [:b, 1], [1, 2], [:b, 1, 2], 3;F: @fileI"enumerator.c;T;0[ [ [[I"Enumerable;Fo;;[ ;0@s[[I" class;F[[:public[[I"new;F@s[:protected[ [:private[ [I" instance;F[[;[[I" each;T@s[I"each_with_index;T@s[I"each_with_object;T@s[I" feed;T@s[I"inspect;T@s[I" next;T@s[I"next_values;T@s[I" peek;T@s[I"peek_values;T@s[I"rewind;T@s[I"with_index;T@s[I"with_object;T@s[;[ [;[