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 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 to_a

Other tags:
    See: Selector#to_a -
def to_a
  res = [@type == :class ? ":" : "::"] + @name
  (res << "(").concat(Haml::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
  super
end