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