Class: Sass::Selector::Class
Overview
A class selector (e.g. .foo
).
Instance Attribute Summary collapse
-
#name ⇒ Array<String, Sass::Script::Node>
readonly
The class name.
Attributes inherited from Simple
Instance Method Summary collapse
-
#initialize(name) ⇒ Class
constructor
A new instance of Class.
- #specificity
- #to_a
Methods inherited from Simple
#eql?, #hash, #inspect, #to_s, #unify, #unify_namespaces
Constructor Details
#initialize(name) ⇒ Class
Returns a new instance of Class.
54 55 56 |
# File 'lib/sass/selector.rb', line 54
def initialize(name)
@name = name
end
|
Instance Attribute Details
#name ⇒ Array<String, Sass::Script::Node> (readonly)
The class name.
51 52 53 |
# File 'lib/sass/selector.rb', line 51
def name
@name
end
|
Instance Method Details
#specificity
64 65 66 |
# File 'lib/sass/selector.rb', line 64
def specificity
SPECIFICITY_BASE
end
|
#to_a
59 60 61 |
# File 'lib/sass/selector.rb', line 59
def to_a
[".", *@name]
end
|