Class: Evidence::Stream
- Inherits:
-
Object
- Object
- Evidence::Stream
- Includes:
- Enumerable
- Defined in:
- lib/evidence/stream.rb
Instance Method Summary collapse
- #each(&block) ⇒ Object
- #eos? ⇒ Boolean
-
#initialize(upstream, processor) ⇒ Stream
constructor
A new instance of Stream.
Constructor Details
#initialize(upstream, processor) ⇒ Stream
Returns a new instance of Stream.
5 6 7 |
# File 'lib/evidence/stream.rb', line 5 def initialize(upstream, processor) @upstream, @processor = upstream, processor end |
Instance Method Details
#each(&block) ⇒ Object
13 14 15 |
# File 'lib/evidence/stream.rb', line 13 def each(&block) @upstream.each(&@processor[block]) end |
#eos? ⇒ Boolean
9 10 11 |
# File 'lib/evidence/stream.rb', line 9 def eos? @upstream.eos? end |