Class: Treequel::Filter::AndComponent
- Defined in:
- lib/treequel/filter.rb
Overview
An ‘and’ filter component
Instance Attribute Summary collapse
-
#filterlist ⇒ Object
readonly
The list of filters to AND together in the filter string.
Instance Method Summary collapse
-
#add_requirement(filter) ⇒ Object
Add an additional filter to the list of requirements.
-
#initialize(*filterlist) ⇒ AndComponent
constructor
Create a new ‘and’ filter component with the given
filterlist. -
#to_s ⇒ Object
Stringify the item.
Methods inherited from Component
inherited, #inspect, #promiscuous?
Constructor Details
#initialize(*filterlist) ⇒ AndComponent
Create a new ‘and’ filter component with the given filterlist.
150 151 152 153 |
# File 'lib/treequel/filter.rb', line 150 def initialize( *filterlist ) @filterlist = Treequel::Filter::FilterList.new( filterlist ) super() end |
Instance Attribute Details
#filterlist ⇒ Object (readonly)
The list of filters to AND together in the filter string
156 157 158 |
# File 'lib/treequel/filter.rb', line 156 def filterlist @filterlist end |
Instance Method Details
#add_requirement(filter) ⇒ Object
Add an additional filter to the list of requirements
164 165 166 |
# File 'lib/treequel/filter.rb', line 164 def add_requirement( filter ) @filterlist << filter end |
#to_s ⇒ Object
Stringify the item
159 160 161 |
# File 'lib/treequel/filter.rb', line 159 def to_s return '&' + @filterlist.to_s end |