Class: Schlepp::Sink::TableObject::Filters
- Inherits:
-
Object
- Object
- Schlepp::Sink::TableObject::Filters
- Defined in:
- lib/schlepp/sink/table_object/filters.rb
Instance Method Summary collapse
- #add(filter) ⇒ Object
- #decorate(writer) ⇒ Object
-
#initialize ⇒ Filters
constructor
A new instance of Filters.
Constructor Details
#initialize ⇒ Filters
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 |