Analyzer::Javascript::Hono
Inherits Analyzer::Javascript::JavascriptEngine < Analyzer < FileHelper < Reference < Object
Constants
HTTP_METHODS = ["get", "post", "put", "delete", "patch", "options", "head", "query"] of ::String
ON_ROUTE_CALL_PATTERN = /\.(?:\s|\n|\r)*on(?:\s|\n|\r)*\(/
ROUTE_CALL_RES = HTTP_METHODS.map do |m| {m, /\b(?:app|router|hono)\s*\.\s*#{m}\s*\(\s*['"]([^'"]+)['"]/} end.to_h
Compiled once — an interpolated regex literal would otherwise be rebuilt (full PCRE2 compile) for every method on every line.
Class methods
tech_name
SourceInstance methods
analyze
Sourcetech
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.