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