aboutsummaryrefslogtreecommitdiffstats
path: root/spec/rubyspec/fixtures/enumerator/classes.rb
blob: 6f285b8efa0fef7e97a12b93deb37c2b18a78c67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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