lib/regexp-examples/regexp_extensions.rb in regexp-examples-0.0.2 vs lib/regexp-examples/regexp_extensions.rb in regexp-examples-0.1.0

- old
+ new

@@ -1,16 +1,16 @@ 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.dup, no_join: true) - full_examples_with_backrefs = \ - RegexpExamples::BackReferenceReplacer.new.substitute_backreferences(full_examples) - full_examples_with_backrefs.map(&:join) + module Examples + def examples + partial_examples = + RegexpExamples::Parser.new(source) + .parse + .map {|repeater| repeater.result} + full_examples = RegexpExamples::permutations_of_strings(partial_examples.dup, no_join: true) + full_examples_with_backrefs = \ + RegexpExamples::BackReferenceReplacer.new.substitute_backreferences(full_examples) + full_examples_with_backrefs.map(&:join) + end end -end include Examples end