module Escher::RackMiddleware::ExcludePath::Helper

Public Instance Methods

excluded_path?(path) click to toggle source
# File lib/escher/rack_middleware/exclude_paths/helper.rb, line 7
def excluded_path?(path)
  excluded_paths.any? do |matcher|
    if matcher.is_a?(Regexp)
      !!(path =~ matcher)
    else
      path == matcher.to_s
    end
  end
end
excluded_paths() click to toggle source
# File lib/escher/rack_middleware/exclude_paths/helper.rb, line 3
def excluded_paths
  @excluded_paths ||= self.class.excluded_paths.dup
end