Sha256: 7fcd23ffa8a14a5b81c2ab277955bd70695966ed1eb7486663d8d134284c62c7

Contents?: true

Size: 384 Bytes

Versions: 5

Compression:

Stored size: 384 Bytes

Contents

class Regexp
  module Examples
    def examples
      partial_examples =
        RegexpExamples::Parser.new(source)
          .parse
          .map {|repeater| repeater.result}
      full_examples = RegexpExamples::permutations_of_strings(partial_examples)
      RegexpExamples::BackReferenceReplacer.new.substitute_backreferences(full_examples)
    end
  end
  include Examples
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
regexp-examples-0.3.1 lib/regexp-examples/regexp_extensions.rb
regexp-examples-0.3.0 lib/regexp-examples/regexp_extensions.rb
regexp-examples-0.2.4 lib/regexp-examples/regexp_extensions.rb
regexp-examples-0.2.3 lib/regexp-examples/regexp_extensions.rb
regexp-examples-0.2.2 lib/regexp-examples/regexp_extensions.rb