class Sass::Selector::AbstractSequence
method that returns an array of strings and script nodes.
of object that respond to ‘#line=` and `#filename=`, as well as a `to_a`
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) spec = 0 arr.map {|m| spec += m.is_a?(String) ? 0 : m.specificity} spec end
def eql?(other)
-
(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 == self.hash && _eql?(other) end
def filename=(filename)
-
(String, nil)
-
Parameters:
-
filename
(String, nil
) --
def filename=(filename) members.each {|m| m.filename = filename} @filename = filename end
def has_placeholder?
Whether or not this selector sequence contains a placeholder selector.
def has_placeholder? @has_placeholder ||= members.any? {|m| m.is_a?(AbstractSequence) ? m.has_placeholder? : m.is_a?(Placeholder)} end
def hash
-
(Fixnum)
-
def hash @_hash ||= _hash end
def line=(line)
-
(Fixnum)
-
Parameters:
-
line
(Fixnum
) --
def line=(line) members.each {|m| m.line = line} @line = line end
def specificity
-
(Fixnum)
-
def specificity _specificity(members) end
def to_s
-
(String)
-
def to_s to_a.map {|e| e.is_a?(Sass::Script::Node) ? "\#{#{e.to_sass}}" : e}.join end