Class: Rack::Mount::RouteSet

Inherits:
Object
  • Object
show all
Defined in:
lib/rack-putty/router.rb

Instance Method Summary collapse

Instance Method Details

#merge_route(route) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/rack-putty/router.rb', line 9

def merge_route(route)
  @routes << route

  @recognition_key_analyzer << route.conditions

  @named_routes[route.name] = route if route.name
  @generation_route_keys << route.generation_keys

  expire!
  route
end

#merge_routes(routes) ⇒ Object



4
5
6
7
# File 'lib/rack-putty/router.rb', line 4

def merge_routes(routes)
  routes.each { |r| merge_route(r) }
  rehash
end