Method: Whisper::Router#initialize
- Defined in:
- lib/whisper/router.rb
#initialize(root) ⇒ Router
Returns a new instance of Router.
11 12 13 14 15 16 |
# File 'lib/whisper/router.rb', line 11 def initialize root root = root.sub(/\/$/, "") @root_re = /^#{Regexp.escape root}/ @handlers = [] @handlers_by_route = {} end |