class Sass::Selector::Pseudo

It can have arguments (e.g. ‘:nth-child(2n+1)`).
A pseudoclass (e.g. `:visited`) or pseudoelement (e.g. `::first-line`) selector.

def final?

def final?
  type == :class && FINAL_SELECTORS.include?(name.first)
end

def initialize(type, name, arg)

Parameters:
  • arg (nil, Array) -- The argument to the selector,
  • name (Array) -- The name of the selector
  • type (Symbol) -- See \{#type}
def initialize(type, name, arg)
  @type = type
  @name = name
  @arg = arg
end

def specificity

Other tags:
    See: AbstractSequence#specificity -
def specificity
  type == :class ? SPECIFICITY_BASE : 1
end

def to_a

Other tags:
    See: Selector#to_a -
def to_a
  res = [@type == :class ? ":" : "::"] + @name
  (res << "(").concat(Sass::Util.strip_string_array(@arg)) << ")" if @arg
  res
end

def unify(sels)

Other tags:
    See: Selector#unify -
def unify(sels)
  return if type == :element && sels.any? do |sel|
    sel.is_a?(Pseudo) && sel.type == :element &&
      (sel.name != self.name || sel.arg != self.arg)
  end
  return sels + [self] if final?
  super
end