Class: CooCoo::Transformers::Proxy

Inherits:
Base show all
Defined in:
lib/coo-coo/transformer.rb

Direct Known Subclasses

Image::Base, Stopper

Instance Method Summary collapse

Methods inherited from Base

bin_op, bin_op_inner, #drop, #first

Constructor Details

#initialize(enum) ⇒ Proxy

Returns a new instance of Proxy.



38
39
40
41
42
43
44
45
46
# File 'lib/coo-coo/transformer.rb', line 38

def initialize(enum)
  @enum = enum
  
  super() do |yielder|
    loop do
      yielder << self.next
    end
  end
end

Instance Method Details

#nextObject



48
49
50
# File 'lib/coo-coo/transformer.rb', line 48

def next
  @enum.next
end