class Gurk::Router
Public Class Methods
new()
click to toggle source
# File lib/gurk/router.rb, line 6 def initialize http_router end
Public Instance Methods
add(page)
click to toggle source
# File lib/gurk/router.rb, line 14 def add(page) routes.push(page) http_router.add(page.route).to { |env| page.render env } end
call(env)
click to toggle source
# File lib/gurk/router.rb, line 25 def call(env) http_router.call(env) end
http_router()
click to toggle source
# File lib/gurk/router.rb, line 10 def http_router @http_router ||= HttpRouter.new end
routes()
click to toggle source
# File lib/gurk/router.rb, line 21 def routes @routes ||= [] end