Bindgen::ConfigReader::ConditionEvaluator
Implements the condition evaluation logic of Parser.
See Parsers documentation for a description of the syntax.
You can sub-class this and pass an instance into a Parser if you want
to augment its feature-set.
Constants
RX = /^(?:els)?if(?: +|_)(.+?)(?: +|_)(is|isnt|matches|newer_or|older_or)(?: +|_)(.*)$/
Regular expression for conditionals.
Matches: [els]if VARIABLE (is|matches) VALUE.
Instead of a space, an underscore may be used instead.
Constructors
Instance methods
Returns true if the text looks like a condition. This is
used to feed all keys in a mapping into.
Evaluates condition_text.