Class: CSS::Selectors::RelativeSelector

Inherits:
Data
  • Object
show all
Includes:
Node
Defined in:
lib/css/selectors/nodes.rb

Overview

One relative selector: an (optionally explicit) leading combinator relative to the ‘:has()` anchor, then a complex selector. `combinator` is `:descendant` (the implicit default, `:has(.x)`), `:child` (`:has(> .x)`), `:next_sibling` (`:has(+ .x)`), or `:subsequent_sibling` (`:has(~ .x)`).

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#combinatorObject (readonly)

Returns the value of attribute combinator

Returns:

  • (Object)

    the current value of combinator



95
96
97
# File 'lib/css/selectors/nodes.rb', line 95

def combinator
  @combinator
end

#complexObject (readonly)

Returns the value of attribute complex

Returns:

  • (Object)

    the current value of complex



95
96
97
# File 'lib/css/selectors/nodes.rb', line 95

def complex
  @complex
end

Instance Method Details

#to_sObject



97
# File 'lib/css/selectors/nodes.rb', line 97

def to_s = Selectors::Serializer.serialize(self)