# File lib/csspool/css/document.rb, line 27 def initialize @rule_sets = [] @charsets = [] @import_rules = [] @parent = nil @parent_import_rule = nil end
# File lib/csspool/css/document.rb, line 4 def self.parse string # If a File object gets passed in, via functions like File.open # or Kernel::open if string.respond_to? :read string = string.read end 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
Generated with the Darkfish Rdoc Generator 2.