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