Parent

Files

CSSPool::Selector

Attributes

simple_selectors[RW]

(Not documented)

parse_location[RW]

(Not documented)

rule_set[RW]

(Not documented)

Public Class Methods

new(simple_selectors = [], parse_location = {}) click to toggle source

(Not documented)

# File lib/csspool/selector.rb, line 7
    def initialize simple_selectors = [], parse_location = {}
      @simple_selectors = simple_selectors
      @parse_location   = parse_location
      @rule_set         = nil
    end

Public Instance Methods

declarations() click to toggle source

(Not documented)

# File lib/csspool/selector.rb, line 13
    def declarations
      @rule_set.declarations
    end
specificity() click to toggle source

(Not documented)

# File lib/csspool/selector.rb, line 17
    def specificity
      a = b = c = 0
      simple_selectors.each do |s|
        c += 1
        s.additional_selectors.each do |additional_selector|
          if Selectors::Id === additional_selector
            a += 1
          else
            b += 1
          end
        end
      end
      [a, b, c]
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.