Class: REXML::CSSSelector::Queries::NotQuery

Inherits:
Object
  • Object
show all
Defined in:
lib/rexml/css_selector/queries/not_query.rb

Instance Method Summary collapse

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