# class Sass::Selector::Id

An id selector (e.g. `#foo`).

### Attributes

name[R]

The id name.

@return [String]

### Public Class Methods

new(name) click to toggle source

@param name [String] The id name

    # File lib/sass/selector.rb, line 86
    def initialize(name)
      @name = name
    end

### Public Instance Methods

specificity() click to toggle source

@see Sass::Selector::AbstractSequence#specificity

    # File lib/sass/selector.rb, line 109
    def specificity
      SPECIFICITY_BASE**2
    end

to_s(opts = {}) click to toggle source

@see Selector#to_s

    # File lib/sass/selector.rb, line 95
    def to_s(opts = {})
      "#" + @name
    end

unify(sels) click to toggle source

Returns `nil` if `sels` contains an {Id} selector with a different name than this one.

@see Selector#unify

Calls superclass method

    # File lib/sass/selector.rb, line 103
    def unify(sels)
      return if sels.any? {|sel2| sel2.is_a?(Id) && name != sel2.name}
      super
    end

unique?() click to toggle source

    # File lib/sass/selector.rb, line 90
    def unique?
      true
    end