Class: KQL::Selector
- Inherits:
-
Object
- Object
- KQL::Selector
- Defined in:
- lib/kql/selector.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Combined
Instance Attribute Summary collapse
-
#filter ⇒ Object
readonly
Returns the value of attribute filter.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #execute(context) ⇒ Object
-
#initialize(filter) ⇒ Selector
constructor
A new instance of Selector.
Constructor Details
#initialize(filter) ⇒ Selector
Returns a new instance of Selector.
5 6 7 |
# File 'lib/kql/selector.rb', line 5 def initialize(filter) @filter = filter end |
Instance Attribute Details
#filter ⇒ Object (readonly)
Returns the value of attribute filter.
3 4 5 |
# File 'lib/kql/selector.rb', line 3 def filter @filter end |
Instance Method Details
#==(other) ⇒ Object
9 10 11 12 13 |
# File 'lib/kql/selector.rb', line 9 def ==(other) return false unless other.class == Selector other.filter == filter end |
#execute(context) ⇒ Object
15 16 17 |
# File 'lib/kql/selector.rb', line 15 def execute(context) filter.execute(context) end |