Class: REXML::CSSSelector::Compiler
- Inherits:
-
Object
- Object
- REXML::CSSSelector::Compiler
- Defined in:
- lib/rexml/css_selector/compiler.rb
Overview
Compiler is a compiler from selectors to queries.
Instance Method Summary collapse
- #compile(selector_list) ⇒ Object
-
#initialize(**config) ⇒ Compiler
constructor
A new instance of Compiler.
- #namespace_name(namespace) ⇒ Object
- #nth_value(nth) ⇒ Object
Constructor Details
#initialize(**config) ⇒ Compiler
Returns a new instance of Compiler.
183 184 185 186 |
# File 'lib/rexml/css_selector/compiler.rb', line 183 def initialize(**config) @config = config @config[:pseudo_classes] ||= {} end |
Instance Method Details
#compile(selector_list) ⇒ Object
188 189 190 |
# File 'lib/rexml/css_selector/compiler.rb', line 188 def compile(selector_list) compile_selector_list(selector_list) end |
#namespace_name(namespace) ⇒ Object
192 193 194 195 196 197 198 199 |
# File 'lib/rexml/css_selector/compiler.rb', line 192 def namespace_name(namespace) case namespace in Namespace[name:] name in UniversalNamespace[] | nil nil end end |