Class: Hexp::CssSelector::Element
- Inherits:
-
Object
- Object
- Hexp::CssSelector::Element
- Includes:
- Named
- Defined in:
- lib/hexp/css_selector.rb
Overview
A CSS element declaration, like ‘div’
Instance Attribute Summary
Attributes included from Named
Instance Method Summary collapse
-
#matches?(element) ⇒ true, false
private
Does the node match this element selector.
- #matches_path?(path) ⇒ Boolean
Methods included from Named
Instance Method Details
#matches?(element) ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Does the node match this element selector
205 206 207 |
# File 'lib/hexp/css_selector.rb', line 205 def matches?(element) element.tag.to_s == name end |
#matches_path?(path) ⇒ Boolean
194 195 196 |
# File 'lib/hexp/css_selector.rb', line 194 def matches_path?(path) matches?(path.last) end |