Class: REXML::CSSSelector::Queries::DisabledQuery
- Inherits:
-
Object
- Object
- REXML::CSSSelector::Queries::DisabledQuery
- Defined in:
- lib/rexml/css_selector/queries/disabled_query.rb
Instance Method Summary collapse
- #call(node, context) ⇒ Object
-
#initialize(cont:) ⇒ DisabledQuery
constructor
A new instance of DisabledQuery.
Constructor Details
#initialize(cont:) ⇒ DisabledQuery
Returns a new instance of DisabledQuery.
7 8 9 |
# File 'lib/rexml/css_selector/queries/disabled_query.rb', line 7 def initialize(cont:) @cont = cont end |
Instance Method Details
#call(node, context) ⇒ Object
11 12 13 14 |
# File 'lib/rexml/css_selector/queries/disabled_query.rb', line 11 def call(node, context) (context.adapter.disabled?(node) || context.[:disabled_elements].include?(node)) && @cont.call(node, context) end |