Class: Sass::Selector::Class

Inherits:
Simple
  • Object
show all
Defined in:
/home/nweiz/code/sass-site/.sass/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?, #equality_key, #hash, #inspect, #unify, #unify_namespaces, #unique?

Constructor Details

- (Class) initialize(name)

Returns a new instance of Class

Parameters:

  • name (String)

    The class name



63
64
65
# File '/home/nweiz/code/sass-site/.sass/lib/sass/selector.rb', line 63

def initialize(name)
  @name = name
end

Instance Attribute Details

- (String) name (readonly)

The class name.

Returns:

  • (String)


60
61
62
# File '/home/nweiz/code/sass-site/.sass/lib/sass/selector.rb', line 60

def name
  @name
end

Instance Method Details

- specificity



73
74
75
# File '/home/nweiz/code/sass-site/.sass/lib/sass/selector.rb', line 73

def specificity
  SPECIFICITY_BASE
end

- to_s(opts = {})

See Also:

  • Selector#to_s


68
69
70
# File '/home/nweiz/code/sass-site/.sass/lib/sass/selector.rb', line 68

def to_s(opts = {})
  "." + @name
end