Class: Xail::FilterComposition

Inherits:
AbstractCompoundFilter show all
Defined in:
lib/xail/filter.rb

Overview

a composition streams the next filter on success

Instance Attribute Summary

Attributes inherited from AbstractCompoundFilter

#filters

Instance Method Summary collapse

Methods inherited from AbstractCompoundFilter

#<<, #initialize

Methods inherited from AbstractFilter

#filterName

Constructor Details

This class inherits a constructor from Xail::AbstractCompoundFilter

Instance Method Details

#streamLine(input) ⇒ Object



102
103
104
105
106
107
108
109
110
# File 'lib/xail/filter.rb', line 102

def streamLine(input)
  @filters.inject(input) do |line,filter|
    if line != nil
      filter.streamLine(line)
    else
      return nil
    end
  end
end