Sha256: a09e38420c4f2643e95a870b49f0ebcb7eb640282073e5dc599754cb48005a87

Contents?: true

Size: 228 Bytes

Versions: 13

Compression:

Stored size: 228 Bytes

Contents

# A common helper used throughout various parser methods
module RegexpExamples
  module CharsetNegationHelper
    def negate_if(charset, is_negative)
      is_negative ? (CharSets::Any.dup - charset) : charset
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
regexp-examples-1.5.1 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.5.0 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.4.4 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.4.3 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.4.2 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.4.1 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.4.0 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.3.2 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.3.1 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.3.0 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.2.1 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.2.0 lib/regexp-examples/parser_helpers/charset_negation_helper.rb
regexp-examples-1.1.4 lib/regexp-examples/parser_helpers/charset_negation_helper.rb