Class: KQL::Selector::Combined
- Inherits:
-
KQL::Selector
- Object
- KQL::Selector
- KQL::Selector::Combined
- Defined in:
- lib/kql/selector.rb
Instance Attribute Summary collapse
-
#combinator ⇒ Object
readonly
Returns the value of attribute combinator.
-
#selector ⇒ Object
readonly
Returns the value of attribute selector.
Attributes inherited from KQL::Selector
Instance Method Summary collapse
- #==(other) ⇒ Object
- #execute(context) ⇒ Object
-
#initialize(filter, combinator, selector) ⇒ Combined
constructor
A new instance of Combined.
Constructor Details
#initialize(filter, combinator, selector) ⇒ Combined
Returns a new instance of Combined.
22 23 24 25 26 |
# File 'lib/kql/selector.rb', line 22 def initialize(filter, combinator, selector) super(filter) @combinator = combinator @selector = selector end |
Instance Attribute Details
#combinator ⇒ Object (readonly)
Returns the value of attribute combinator.
20 21 22 |
# File 'lib/kql/selector.rb', line 20 def combinator @combinator end |
#selector ⇒ Object (readonly)
Returns the value of attribute selector.
20 21 22 |
# File 'lib/kql/selector.rb', line 20 def selector @selector end |
Instance Method Details
#==(other) ⇒ Object
28 29 30 31 32 33 34 |
# File 'lib/kql/selector.rb', line 28 def ==(other) return false unless other.is_a?(Combined) other.filter == filter && other.combinator == combinator && other.selector == selector end |
#execute(context) ⇒ Object
36 37 38 |
# File 'lib/kql/selector.rb', line 36 def execute(context) combinator.execute(super, selector) end |