Method: Erudite::Example.pattern

Defined in:
lib/erudite/example.rb

.pattern(string) ⇒ Object



58
59
60
# File 'lib/erudite/example.rb', line 58

def self.pattern(string)
  Regexp.new(Regexp.escape(string).gsub('\.\.\.', '.*?'))
end