Method: MustacheRender::Mustache::Parser#regexp

Defined in:
lib/mustache_render/mustache/parser.rb

#regexp(thing) ⇒ Object

Used to quickly convert a string into a regular expression usable by the string scanner.



254
255
256
# File 'lib/mustache_render/mustache/parser.rb', line 254

def regexp(thing)
  /#{Regexp.escape(thing)}/
end