Class: CSSPool::SAC::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/csspool/sac/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(document = CSSPool::SAC::Document.new) ⇒ Parser

Returns a new instance of Parser.



6
7
8
9
# File 'lib/csspool/sac/parser.rb', line 6

def initialize document = CSSPool::SAC::Document.new
  @document = document
  @selector_stack = []
end

Instance Attribute Details

#documentObject

Returns the value of attribute document.



4
5
6
# File 'lib/csspool/sac/parser.rb', line 4

def document
  @document
end

Instance Method Details

#parse(string) ⇒ Object



11
12
13
# File 'lib/csspool/sac/parser.rb', line 11

def parse string
  parse_memory(string, 5)
end