class

Analyzer::Crystal::Lucky

Inherits Analyzer::Crystal::CrystalEngine < FileScanEngine < Analyzer < FileHelper < Reference < Object

Constants

LUCKY_EXTRA_ROUTES = [{"TRACE", TRACE_ROUTE_PATTERN}] of Tuple(String, Regex)
RESOURCEFUL_ACTIONS = ["index", "show", "new", "create", "edit", "update", "delete"] of ::String
TRACE_ROUTE_PATTERN = /(?:^|[^.\w])trace\s*(?:\(\s*)?['"](.+?)['"]/

Lucky uniquely registers TRACE routes. Shared engine verbs cover the rest; this is stitched in via match_crystal_simple_route(..., extra:).

Class methods

tech_name
Source

Instance methods

analyze
Source
analyze_file(path : String) : Array(Endpoint)
Source
line_to_endpoint(content : String) : Endpoint
Source
line_to_param(content : String) : Param
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