class Sass::Selector::AbstractSequence

method that returns the string representation of the selector.
of object that respond to ‘#line=` and `#filename=`, as well as a `to_s`
All subclasses should implement a `members` method that returns an array
The abstract parent class of the various selector sequence classes.

def _specificity(arr)

def _specificity(arr)
  min = 0
  max = 0
  arr.each do |m|
    next if m.is_a?(String)
    spec = m.specificity
    if spec.is_a?(Range)
      min += spec.begin
      max += spec.end
    else
      min += spec
      max += spec
    end
  end
  min == max ? min : (min..max)
end

def eql?(other)

Returns:
  • (Boolean) - Whether or not this is equal to `other`

Parameters:
  • other (Object) -- The object to test equality against
def eql?(other)
  other.class == self.class && other.hash == hash && _eql?(other)
end

def filename=(filename)

Returns:
  • (String, nil) -

Parameters:
  • filename (String, nil) --
def filename=(filename)
  members.each {|m| m.filename = filename}
  @filename = filename
end

def has_placeholder?

Checks recursively.
Whether or not this selector sequence contains a placeholder selector.
def has_placeholder?
  @has_placeholder ||= members.any? do |m|
    next m.has_placeholder? if m.is_a?(AbstractSequence)
    next m.selector && m.selector.has_placeholder? if m.is_a?(Pseudo)
    m.is_a?(Placeholder)
  end
end

def hash

Returns:
  • (Fixnum) -
def hash
  @_hash ||= _hash
end

def line=(line)

Returns:
  • (Fixnum) -

Parameters:
  • line (Fixnum) --
def line=(line)
  members.each {|m| m.line = line}
  @line = line
end

def specificity

Returns:
  • (Fixnum, Range) -
def specificity
  _specificity(members)
end

def to_s

Returns:
  • (String) -
def to_s
  Sass::Util.abstract(self)
end