Class: Rusty::Selector::CachedCSS
Overview
A cached CSS selector, caches matching nodes within a document.
Instance Attribute Summary
Attributes inherited from CSS
Instance Method Summary collapse
-
#match?(node) ⇒ Boolean
Does this selector matches a specific node?.
Methods inherited from CSS
Constructor Details
This class inherits a constructor from Rusty::Selector::CSS
Instance Method Details
#match?(node) ⇒ Boolean
Does this selector matches a specific node?
57 58 59 60 61 62 |
# File 'lib/rusty/selector.rb', line 57 def match?(node) return false unless node cache_document(node.document) @matching_nodes.include?(node) end |