Class: Sass::Selector::Placeholder

Inherits:
Simple
  • Object
show all
Defined in:
lib/sass/selector.rb

Overview

A placeholder selector (e.g. %foo). This exists to be replaced via @extend. Rulesets using this selector will not be printed, but can be extended. Otherwise, this acts just like a class selector.

Instance Attribute Summary collapse

Attributes inherited from Simple

#filename, #line

Instance Method Summary collapse

Methods inherited from Simple

#eql?, #equality_key, #hash, #inspect, #to_s, #unify, #unify_namespaces

Constructor Details

#initialize(name) ⇒ Placeholder

Returns a new instance of Placeholder.

Parameters:



120
121
122
# File 'lib/sass/selector.rb', line 120

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameArray<String, Sass::Script::Tree::Node> (readonly)

The placeholder name.

Returns:



117
118
119
# File 'lib/sass/selector.rb', line 117

def name
  @name
end

Instance Method Details

#specificity



130
131
132
# File 'lib/sass/selector.rb', line 130

def specificity
  SPECIFICITY_BASE
end

#to_a

See Also:

  • Selector#to_a


125
126
127
# File 'lib/sass/selector.rb', line 125

def to_a
  ["%", *@name]
end