class

Analyzer::Clojure::Ring

Inherits Analyzer < FileHelper < Reference < Object

Generic Ring handler analyzer — extracts endpoints from Clojure code that dispatches directly on (:uri request) / (:request-method request) via case, condp, or cond, without going through Compojure's routing macros.

Constants

CLOJURE_EXTENSIONS = {".clj", ".cljc", ".cljs"}
METHOD_KEYWORDS = {"get" => "GET", "post" => "POST", "put" => "PUT", "delete" => "DELETE", "patch" => "PATCH", "head" => "HEAD", "options" => "OPTIONS", "any" => "ANY"}
RING_EXCLUDE_RE = Regex.union("compojure.core", "defroutes")

Whole-file detection gates, evaluated once per candidate file. String#matches? (PCRE2 JIT) replaces the naive String#includes? char scans with a single pass; Regex.union auto-escapes each literal, so each is provably equivalent to the OR-of-substrings it replaces.

RING_SIGNAL_RE = Regex.union(":request-method", ":uri")

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source