Class: Schlepp::Sink::TableObject::Filters

Inherits:
Object
  • Object
show all
Defined in:
lib/schlepp/sink/table_object/filters.rb

Instance Method Summary collapse

Constructor Details

#initializeFilters

Returns a new instance of Filters.



5
6
7
# File 'lib/schlepp/sink/table_object/filters.rb', line 5

def initialize
  @filters = []
end

Instance Method Details

#add(filter) ⇒ Object



9
10
11
# File 'lib/schlepp/sink/table_object/filters.rb', line 9

def add(filter)
  @filters << filter
end

#decorate(writer) ⇒ Object



13
14
15
16
17
# File 'lib/schlepp/sink/table_object/filters.rb', line 13

def decorate(writer)
  @filters.reverse.inject(writer) do |base, f| 
    f.decorate(base) 
  end
end