Module: CoreExtensions::Regexp::Examples

Defined in:
lib/regexp-examples/core_extensions/regexp/examples.rb

Instance Method Summary collapse

Instance Method Details

#examples(options = {}) ⇒ Object



4
5
6
7
8
9
# File 'lib/regexp-examples/core_extensions/regexp/examples.rb', line 4

def examples(options={})
  full_examples = RegexpExamples.map_results(
    RegexpExamples::Parser.new(source, options).parse
  )
  RegexpExamples::BackReferenceReplacer.new.substitute_backreferences(full_examples)
end