Parent

Methods

Files

CSSPool::CSS::Document

Attributes

rule_sets[RW]

(Not documented)

charsets[RW]

(Not documented)

import_rules[RW]

(Not documented)

parent[RW]

(Not documented)

parent_import_rule[RW]

(Not documented)

Public Class Methods

new() click to toggle source

(Not documented)

# File lib/csspool/css/document.rb, line 20
      def initialize
        @rule_sets    = []
        @charsets     = []
        @import_rules = []
        @parent       = nil
        @parent_import_rule = nil
      end
parse(string) click to toggle source

(Not documented)

# File lib/csspool/css/document.rb, line 4
      def self.parse string
        unless string && string.length > 0
          return CSSPool::CSS::Document.new
        end
        handler = CSSPool::CSS::DocumentHandler.new
        parser = CSSPool::SAC::Parser.new(handler)
        parser.parse(string)
        handler.document
      end

Public Instance Methods

[](selector) click to toggle source

(Not documented)

# File lib/csspool/css/document.rb, line 28
      def [] selector
        selectors = CSSPool.CSS("#{selector} {}").rule_sets.first.selectors
        rule_sets.find_all { |rs| rs.selectors == selectors}
      end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.