Class: Treequel::Filter::FilterList
- Inherits:
-
Object
- Object
- Treequel::Filter::FilterList
- Extended by:
- Loggability
- Defined in:
- lib/treequel/filter.rb
Overview
Filter list component of a Treequel::Filter.
Instance Attribute Summary collapse
-
#filters ⇒ Object
readonly
The filters in the FilterList.
Instance Method Summary collapse
-
#<<(other) ⇒ Object
Append operator: add the
otherfilter to the list. -
#initialize(*filters) ⇒ FilterList
constructor
Create a new filter list with the given
filtersin it. -
#to_s ⇒ Object
Return the FilterList as a string.
Constructor Details
#initialize(*filters) ⇒ FilterList
Create a new filter list with the given filters in it.
57 58 59 |
# File 'lib/treequel/filter.rb', line 57 def initialize( *filters ) @filters = filters.flatten end |
Instance Attribute Details
#filters ⇒ Object (readonly)
The filters in the FilterList
66 67 68 |
# File 'lib/treequel/filter.rb', line 66 def filters @filters end |
Instance Method Details
#<<(other) ⇒ Object
Append operator: add the other filter to the list.
76 77 78 79 |
# File 'lib/treequel/filter.rb', line 76 def <<( other ) @filters << other return self end |
#to_s ⇒ Object
Return the FilterList as a string.
70 71 72 |
# File 'lib/treequel/filter.rb', line 70 def to_s return self.filters.collect {|f| f.to_s }.join end |