class Workarea::BasicAuth::SimpleRouteSet

Attributes

paths[R]

Public Class Methods

new() click to toggle source
# File lib/workarea/basic_auth/simple_route_set.rb, line 6
def initialize
  @paths = []
end

Public Instance Methods

add(path_string, *http_methods) click to toggle source
# File lib/workarea/basic_auth/simple_route_set.rb, line 10
def add(path_string, *http_methods)
  paths.push(Path.new(path_string, *http_methods))
end
matches?(request) click to toggle source
# File lib/workarea/basic_auth/simple_route_set.rb, line 18
def matches?(request)
  paths.detect { |path| path.matches?(request) }.present?
end
remove(path_string) click to toggle source
# File lib/workarea/basic_auth/simple_route_set.rb, line 14
def remove(path_string)
  @paths = paths.reject { |path| path.matches?(path_string) }
end