Class: XML::SAX::Pipeline

Inherits:
Filter
  • Object
show all
Defined in:
lib/xml-sax-machines/pipeline.rb

Overview

Define a filter chain top to bottom.

– TODO:

  • More enumerable methods so you can alter pipelines.

Instance Attribute Summary

Attributes inherited from Filter

#filter

Instance Method Summary collapse

Methods inherited from Filter

#cdata_block, #characters, #comment, #end_document, #end_element_namespace, #error, #start_document, #start_element_namespace, #warning

Constructor Details

#initialize(*filters) ⇒ Pipeline

Returns a new instance of Pipeline.



10
11
12
# File 'lib/xml-sax-machines/pipeline.rb', line 10

def initialize(*filters)
  self.filter = filters.each_with_index{|f, i| f.filter = filters[i + 1]}.first
end