Class: Sass::Selector::Placeholder
- Inherits:
- Simple
- Object
- Simple
- Sass::Selector::Placeholder
- Defined in:
- /Users/ceppstei/Projects/sass-lang/.sass/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)
- - (String) name readonly
The placeholder name.
Attributes inherited from Simple
Instance Method Summary (collapse)
- - (Placeholder) initialize(name) constructor
A new instance of Placeholder.
- - specificity
- - to_s(opts = {})
Methods inherited from Simple
#eql?, #equality_key, #hash, #inspect, #unify, #unify_namespaces
Constructor Details
- (Placeholder) initialize(name)
Returns a new instance of Placeholder
121 122 123 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/selector.rb', line 121
def initialize(name)
@name = name
end |
Instance Attribute Details
- (String) name (readonly)
The placeholder name.
118 119 120 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/selector.rb', line 118
def name
@name
end |
Instance Method Details
- specificity
131 132 133 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/selector.rb', line 131
def specificity
SPECIFICITY_BASE
end |
- to_s(opts = {})
126 127 128 | # File '/Users/ceppstei/Projects/sass-lang/.sass/lib/sass/selector.rb', line 126
def to_s(opts = {})
"%" + @name
end |