Class | Nokogiri::CSS::Parser
In: | lib/nokogiri/css/parser.rb
Parent: | GeneratedTokenizer

### Methods

[] []= clear_cache new on_error parse without_cache xpath_for

### External Aliases

cache_on | -> | cache_on?
cache_on= | -> | set_cache
scan_str | -> | parse

### Attributes

cache_on | [RW] | Turn on CSS parse caching

### Public Class methods

[](string)

Get the css selector in `string` from the cache

[]=(string, value)

Set the css selector in `string` in the cache to `value`

clear_cache()

Clear the cache

new(namespaces = {})

Create a new CSS parser with respect to `namespaces`

parse(selector)

Parse this CSS selector in `selector`. Returns an AST.

without_cache(&block)

Execute `block` without cache

### Public Instance methods

on_error(error_token_id, error_value, value_stack)

On CSS parser error, raise an exception

xpath_for(string, options={})

Get the xpath for `string` using `options`

[Validate]