Class: ColorContrastCalc::ColorFunctionParser::Parser
- Inherits:
-
Object
- Object
- ColorContrastCalc::ColorFunctionParser::Parser
- Defined in:
- lib/color_contrast_calc/color_function_parser.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.function ⇒ Object
Returns the value of attribute function.
-
.main ⇒ Object
Returns the value of attribute main.
-
.parsers ⇒ Object
Returns the value of attribute parsers.
-
.value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Class Attribute Details
.function ⇒ Object
Returns the value of attribute function.
381 382 383 |
# File 'lib/color_contrast_calc/color_function_parser.rb', line 381 def function @function end |
.main ⇒ Object
Returns the value of attribute main.
381 382 383 |
# File 'lib/color_contrast_calc/color_function_parser.rb', line 381 def main @main end |
.parsers ⇒ Object
Returns the value of attribute parsers.
381 382 383 |
# File 'lib/color_contrast_calc/color_function_parser.rb', line 381 def parsers @parsers end |
.value ⇒ Object
Returns the value of attribute value.
381 382 383 |
# File 'lib/color_contrast_calc/color_function_parser.rb', line 381 def value @value end |
Instance Method Details
#read_scheme!(scanner) ⇒ Object
390 391 392 393 394 395 396 397 398 399 400 401 |
# File 'lib/color_contrast_calc/color_function_parser.rb', line 390 def read_scheme!(scanner) scheme = read_token!(scanner, TokenRe::SCHEME).downcase parsed_value = { scheme: scheme, parameters: [] } parser = Parser.parsers[scheme] || self parser.read_open_paren!(scanner, parsed_value) end |