class
Analyzer::Crystal::Grip
Defined in:
analyzer/analyzers/crystal/grip.crConstant Summary
-
VERB_ROUTE_PATTERNS =
(["get", "post", "put", "patch", "delete", "options", "head"] of ::String).map do |method| {method, /(?:^|[^.\w])#{method}\s+['"](.+?)['"]/} end -
Crystal recompiles an interpolated regex literal on every evaluation (a full PCRE2 JIT compile). The verb set is fixed, so precompile the per-verb route matchers once at load time.
Instance Method Summary
- #analyze_file(path : String) : Array(Endpoint)
- #line_to_endpoint(content : String, scopes : Array(String)) : Endpoint
- #line_to_param(content : String) : Param
- #line_to_websocket(content : String, scopes : Array(String)) : Endpoint