Module: Sinatra::AdvancedRoutes

Defined in:
lib/sinatra/advanced_routes.rb

Defined Under Namespace

Modules: ArrayMethods, ClassMethods, Route

Class Method Summary collapse

Class Method Details

.registered(klass) ⇒ Object



153
154
155
156
157
158
159
160
161
# File 'lib/sinatra/advanced_routes.rb', line 153

def self.registered(klass)
  klass.extend ClassMethods
  klass.routes.each do |verb, routes|
    routes.each do |route|
      route.to_route! verb, :app => klass
      klass.send :invoke_hook, :advanced_root_added, route
    end
  end
end