Parent

Methods

Class/Module Index [+]

Quicksearch

Sass::Selector::Parent

A parent-referencing selector (`&` in Sass). The function of this is to be replaced by the parent selector in the nested hierarchy.

Attributes

suffix[R]

The identifier following the `&`. Often empty.

@return [Array<String, Sass::Script::Tree::Node>]

Public Class Methods

new(suffix = []) click to toggle source

@param name [Array<String, Sass::Script::Tree::Node>] See {#suffix}

# File lib/sass/selector.rb, line 36
def initialize(suffix = [])
  @suffix = suffix
end

Public Instance Methods

to_a() click to toggle source

@see Selector#to_a

# File lib/sass/selector.rb, line 41
def to_a
  ["&", *@suffix]
end
unify(sels) click to toggle source

Always raises an exception.

@raise [Sass::SyntaxError] Parent selectors should be resolved before unification @see Selector#unify

# File lib/sass/selector.rb, line 49
def unify(sels)
  raise Sass::SyntaxError.new("[BUG] Cannot unify parent selectors.")
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.