Class: REXML::CSSSelector::Queries::AttributePresenceQuery
- Inherits:
-
Object
- Object
- REXML::CSSSelector::Queries::AttributePresenceQuery
- Defined in:
- lib/rexml/css_selector/queries/attribute_presence_query.rb
Instance Method Summary collapse
- #call(node, context) ⇒ Object
-
#initialize(cont:, name:, namespace:) ⇒ AttributePresenceQuery
constructor
A new instance of AttributePresenceQuery.
Constructor Details
#initialize(cont:, name:, namespace:) ⇒ AttributePresenceQuery
Returns a new instance of AttributePresenceQuery.
7 8 9 10 11 |
# File 'lib/rexml/css_selector/queries/attribute_presence_query.rb', line 7 def initialize(cont:, name:, namespace:) @cont = cont @name = name @namespace = namespace end |
Instance Method Details
#call(node, context) ⇒ Object
13 14 15 16 |
# File 'lib/rexml/css_selector/queries/attribute_presence_query.rb', line 13 def call(node, context) context.adapter.get_attribute(node, @name, @namespace, context.[:attribute_name_case]) && @cont.call(node, context) end |