mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
16 lines
213 B
Ruby
16 lines
213 B
Ruby
![]() |
module EnumSpecs
|
||
|
class Numerous
|
||
|
|
||
|
include Enumerable
|
||
|
|
||
|
def initialize(*list)
|
||
|
@list = list.empty? ? [2, 5, 3, 6, 1, 4] : list
|
||
|
end
|
||
|
|
||
|
def each
|
||
|
@list.each { |i| yield i }
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|