Class: CooCoo::Transformers::Proxy
- Inherits:
-
Base
- Object
- Enumerator
- Base
- CooCoo::Transformers::Proxy
- Defined in:
- lib/coo-coo/transformer.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(enum) ⇒ Proxy
constructor
A new instance of Proxy.
- #next ⇒ Object
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
#next ⇒ Object
48 49 50 |
# File 'lib/coo-coo/transformer.rb', line 48 def next @enum.next end |