Parent

Methods

Files

HttpRouter::Rack::URLMap

Public Class Methods

new(map = {}) click to toggle source
# File lib/http_router/rack/url_map.rb, line 6
def initialize(map = {})
  @router = HttpRouter.new
  map.each { |path, app| (path =~ /^(https?):\/\/(.*?)(\/.*)/ ? @router.add($3).host($2).scheme($1) : @router.add(path)).partial.to(app) }
end

Public Instance Methods

call(env) click to toggle source
# File lib/http_router/rack/url_map.rb, line 11
def call(env)
  @router.call(env)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.