Class: CSSPool::SAC::Parser
- Inherits:
-
CSS::Tokenizer
- Object
- Racc::Parser
- CSS::Parser
- CSS::Tokenizer
- CSSPool::SAC::Parser
- Defined in:
- lib/csspool/sac/parser.rb
Constant Summary
Constants inherited from CSS::Parser
CSS::Parser::Racc_arg, CSS::Parser::Racc_debug_parser, CSS::Parser::Racc_token_to_s_table
Instance Attribute Summary collapse
-
#handler ⇒ Object
Returns the value of attribute handler.
Attributes inherited from CSS::Tokenizer
Instance Method Summary collapse
-
#initialize(handler = CSSPool::CSS::DocumentHandler.new) ⇒ Parser
constructor
A new instance of Parser.
- #parse(string) ⇒ Object
Methods inherited from CSS::Tokenizer
#_next_token, #action, #load_file, #next_token, #scan_file, #scan_setup, #scan_str, #st
Methods inherited from CSS::Parser
Constructor Details
#initialize(handler = CSSPool::CSS::DocumentHandler.new) ⇒ Parser
Returns a new instance of Parser.
6 7 8 |
# File 'lib/csspool/sac/parser.rb', line 6 def initialize handler = CSSPool::CSS::DocumentHandler.new @handler = handler end |
Instance Attribute Details
#handler ⇒ Object
Returns the value of attribute handler.
4 5 6 |
# File 'lib/csspool/sac/parser.rb', line 4 def handler @handler end |
Instance Method Details
#parse(string) ⇒ Object
10 11 12 13 |
# File 'lib/csspool/sac/parser.rb', line 10 def parse string scan_str string @handler.document end |