class
Analyzer::Ruby::Rails::RouteFileState
- Analyzer::Ruby::Rails::RouteFileState
- Reference
- Object
Overview
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.
Defined in:
analyzer/analyzers/ruby/rails.crConstructors
Instance Method Summary
- #concern_resources : Hash(String, Array(ConcernResource))
-
#current_line : Int32 | Nil
1-based line of the
config/routes.rbdirective 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. -
#current_line=(current_line : Int32 | Nil)
1-based line of the
config/routes.rbdirective 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. -
#details : Details
A fresh
Detailsfor the directive being handled. - #doorkeeper_controllers : Hash(String, String)
- #doorkeeper_controllers=(doorkeeper_controllers : Hash(String, String))
-
#doorkeeper_skip : Set(String)
`use_doorkeeper do ...
-
#doorkeeper_skip=(doorkeeper_skip : Set(String))
`use_doorkeeper do ...
- #framework_root : String
- #parsed_route_files : Set(String)
- #routes_path : String
- #stack : Array(Frame)
Constructor Detail
Instance Method Detail
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.
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.
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.
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.
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.