class Rack::Forwarder::Registry

Constants

Matcher

Public Class Methods

new() click to toggle source
# File lib/rack/forwarder/registry.rb, line 4
def initialize
  @store = []
end

Public Instance Methods

match?(path) click to toggle source
# File lib/rack/forwarder/registry.rb, line 12
def match?(path)
  @store.find { |matcher| matcher.match?(path) }
end
register(regexp, to) click to toggle source
# File lib/rack/forwarder/registry.rb, line 8
def register(regexp, to)
  @store << Matcher.new(regexp, to)
end