Class: Hexp::CssSelector::Class

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

Overview

A CSS class declaration, like ‘.foo’

Instance Attribute Summary

Attributes included from Named

#name

Instance Method Summary collapse

Methods included from Named

#initialize, #inspect

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 class selector

Parameters:

Returns:

  • (true, false)


233
234
235
# File 'lib/hexp/css_selector.rb', line 233

def matches?(element)
  element.class?(name)
end