class Sass::Selector::CommaSequence
A comma-separated sequence of selectors.
def _eql?(other)
def _eql?(other) other.class == self.class && other.members.eql?(self.members) end
def _hash
def _hash members.hash end
def do_extend(extends)
-
(CommaSequence)
- A copy of this selector,
Parameters:
-
extends
(Haml::Util::SubsetMap{Selector::Simple => Selector::Sequence}
) --
Other tags:
- Todo: - Link this to the reference documentation on `@extend`
def do_extend(extends) CommaSequence.new(members.map {|seq| seq.do_extend(extends)}.flatten) end
def initialize(seqs)
-
seqs
(Array
) -- See \{#members}
def initialize(seqs) @members = seqs end
def inspect
-
(String)
-
def inspect members.map {|m| m.inspect}.join(", ") end
def resolve_parent_refs(super_cseq)
-
(Sass::SyntaxError)
- If a parent selector is invalid
Returns:
-
(CommaSequence)
- This selector, with parent references resolved
Parameters:
-
super_cseq
(CommaSequence
) -- The parent selector
def resolve_parent_refs(super_cseq) if super_cseq.nil? if @members.any? do |sel| sel.members.any? do |sel_or_op| sel_or_op.is_a?(SimpleSequence) && sel_or_op.members.any? {|ssel| ssel.is_a?(Parent)} end end raise Sass::SyntaxError.new("Base-level rules cannot contain the parent-selector-referencing character '&'.") end return self end CommaSequence.new( super_cseq.members.map do |super_seq| @members.map {|seq| seq.resolve_parent_refs(super_seq)} end.flatten) end
def to_a
- See: Simple#to_a -
def to_a arr = Haml::Util.intersperse(@members.map {|m| m.to_a}, ", ").flatten arr.delete("\n") arr end