Class: REXML::CSSSelector::Queries::NotQuery
- Inherits:
-
Object
- Object
- REXML::CSSSelector::Queries::NotQuery
- Defined in:
- lib/rexml/css_selector/queries/not_query.rb
Instance Method Summary collapse
- #call(node, context) ⇒ Object
-
#initialize(cont:, query:) ⇒ NotQuery
constructor
A new instance of NotQuery.
Constructor Details
#initialize(cont:, query:) ⇒ NotQuery
Returns a new instance of NotQuery.
7 8 9 10 |
# File 'lib/rexml/css_selector/queries/not_query.rb', line 7 def initialize(cont:, query:) @cont = cont @query = query end |
Instance Method Details
#call(node, context) ⇒ Object
12 13 14 |
# File 'lib/rexml/css_selector/queries/not_query.rb', line 12 def call(node, context) !@query.call(node, context) && @cont.call(node, context) end |