Class | Brakeman::Tracker |
In: |
lib/brakeman/tracker.rb
|
Parent: | Object |
The Tracker keeps track of all the processed information.
UNKNOWN_MODEL | = | :BrakemanUnresolvedModel | Place holder when there should be a model, but it is not clear what model it will be. |
checks | [RW] | |
config | [RW] | |
constants | [RW] | |
controllers | [RW] | |
duration | [RW] | |
end_time | [RW] | |
errors | [RW] | |
filter_cache | [RW] | |
ignored_filter | [RW] | |
initializers | [RW] | |
libs | [RW] | |
models | [RW] | |
options | [RW] | |
processor | [RW] | |
routes | [RW] | |
start_time | [RW] | |
template_cache | [RW] | |
templates | [RW] |
Iterates over each template, yielding the name and the template. Prioritizes templates which have been rendered.
Add an error to the list. If no backtrace is given, the one from the exception will be used.
Find a method call.
* :target => target name(s) * :method => method name(s) * :chained => search in method chains
If :target => false or :target => nil, searches for methods without a target. Targets and methods can be specified as a symbol, an array of symbols, or a regular expression.
If :chained => true, matches target at head of method chain and method at end.
For example:
find_call :target => User, :method => :all, :chained => true
could match
User.human.active.all(...)
Reindex call sites
Takes a set of symbols which can include :templates, :models, or :controllers
This will limit reindexing to the given sets
Clear information related to templates. If :only_rendered => true, will delete templates rendered from controllers (but not those rendered from other templates)