Class: Usher::Util::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/usher/util/parser.rb

Defined Under Namespace

Classes: ParserInstance

Class Method Summary collapse

Class Method Details

.for_delimiters(router, valid_regex) ⇒ Object



7
8
9
10
11
12
# File 'lib/usher/util/parser.rb', line 7

def self.for_delimiters(router, valid_regex)
  ParserInstance.new(
    router,
    Regexp.new('((:|\*)?' + valid_regex + '|' + router.delimiters_regex + '|\(|\)|\||\{)')
  )
end