module RegexpExamples::CharsetNegationHelper

Public Instance Methods

negate_if(charset, is_negative) click to toggle source
# File lib/regexp-examples/parser_helpers/charset_negation_helper.rb, line 4
def negate_if(charset, is_negative)
  is_negative ? (CharSets::Any.dup - charset.to_a) : charset
end