class

Analyzer::Ruby::Rails::RouteFileState

Inherits Reference < Object

Everything one routes.rb walk carries: the file-wide constants plus the mutable parse state the directive handlers below read and update. The collections are shared by reference — a handler pushing a frame or recording a concern mutates the very objects parse_routes_file walks — while the doorkeeper config is swapped for fresh containers when a use_doorkeeper block closes, so those two are reassignable.

Constructors

new(framework_root : String, routes_path : String, parsed_route_files : Set(String), stack : Array(Frame), concern_resources : Hash(String, Array(ConcernResource)))
Source

Instance methods

concern_resources
Source
current_line

1-based line of the config/routes.rb directive currently being handled, so every endpoint the handlers emit can point at the line the route is declared on rather than at the bare file.

Source
current_line=(current_line : Int32 | Nil)

1-based line of the config/routes.rb directive currently being handled, so every endpoint the handlers emit can point at the line the route is declared on rather than at the bare file.

Source
details

A fresh Details for the directive being handled. Deliberately not memoized: every endpoint needs its own so the routes.rb line differs per route, and a shared Details would also share the code_paths array by reference across every endpoint of the file.

Source
doorkeeper_controllers
Source
doorkeeper_controllers=(doorkeeper_controllers : Hash(String, String))
Source
doorkeeper_skip

use_doorkeeper do ... end config accumulated while the block is on top of the stack: skip_controllers :foo drops a group, controllers foo: 'bar' remaps the implementing controller.

Source
doorkeeper_skip=(doorkeeper_skip : Set(String))

use_doorkeeper do ... end config accumulated while the block is on top of the stack: skip_controllers :foo drops a group, controllers foo: 'bar' remaps the implementing controller.

Source
framework_root
Source
parsed_route_files
Source
routes_path
Source
stack
Source