Module: RegexpExamples::CharsetNegationHelper
- Included in:
- ChargroupParser, Parser
- Defined in:
- lib/regexp-examples/parser_helpers/charset_negation_helper.rb
Instance Method Summary collapse
Instance Method Details
#negate_if(charset, is_negative) ⇒ Object
4 5 6 |
# File 'lib/regexp-examples/parser_helpers/charset_negation_helper.rb', line 4 def negate_if(charset, is_negative) is_negative ? (CharSets::Any.dup - charset) : charset end |