Class: Hexp::CssSelector::Id

Inherits:
Object
  • Object
show all
Includes:
Named
Defined in:
lib/hexp/css_selector.rb

Overview

A CSS id declaration, like '#section-14'

Instance Attribute Summary

Attributes included from Named

#name

Instance Method Summary (collapse)

Methods included from Named

#initialize, #inspect

Instance Method Details

- (Boolean) matches?(element)

Returns:

  • (Boolean)


153
154
155
# File 'lib/hexp/css_selector.rb', line 153

def matches?(element)
  element.attr('id') == name
end