Class: Sass::Selector::Class

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

Overview

A class selector (e.g. .foo).

Instance Attribute Summary collapse

Attributes inherited from Simple

#filename, #line

Instance Method Summary collapse

Methods inherited from Simple

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

Constructor Details

#initialize(name) ⇒ Class

Returns a new instance of Class.

Parameters:



47
48
49
# File 'lib/sass/selector.rb', line 47

def initialize(name)
  @name = name
end

Instance Attribute Details

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

The class name.

Returns:



44
45
46
# File 'lib/sass/selector.rb', line 44

def name
  @name
end

Instance Method Details

#to_a

See Also:

  • Selector#to_a


52
53
54
# File 'lib/sass/selector.rb', line 52

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