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, #unify, #unify_namespaces

Constructor Details

#initialize(name) ⇒ Placeholder

Returns a new instance of Placeholder.

Parameters:

  • name (String)

    The placeholder name



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

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameString (readonly)

The placeholder name.

Returns:

  • (String)


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

def name
  @name
end

Instance Method Details

#specificity



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

def specificity
  SPECIFICITY_BASE
end

#to_s

See Also:

  • Selector#to_s


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

def to_s
  "%" + @name
end