Class: Fluent::Compat::OutputChain
- Inherits:
-
Object
- Object
- Fluent::Compat::OutputChain
- Defined in:
- lib/fluent/compat/output_chain.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(array, tag, es, chain = NullOutputChain.instance) ⇒ OutputChain
constructor
A new instance of OutputChain.
- #next ⇒ Object
Constructor Details
#initialize(array, tag, es, chain = NullOutputChain.instance) ⇒ OutputChain
Returns a new instance of OutputChain.
30 31 32 33 34 35 36 |
# File 'lib/fluent/compat/output_chain.rb', line 30 def initialize(array, tag, es, chain=NullOutputChain.instance) @array = array @tag = tag @es = es @offset = 0 @chain = chain end |
Instance Method Details
#next ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'lib/fluent/compat/output_chain.rb', line 38 def next if @array.length <= @offset return @chain.next end @offset += 1 @array[@offset-1].emit_events(@tag, @es) self.next end |