Noir::RubyCalleeExtractor
Inherits Noir::CalleeExtractorBase
Constants
ATTRIBUTE_READERS = Set {"id", "ids", "uuid", "guid", "token", "key", "name", "username", "title", "description", "text", "body", "message", "url", "uri", "path", "email", "status", "state", "type", "role", "score", "size", "length", "first", "last", "active", "attributes", "safe_attributes", "password", "password_confirmation", "scheme_name"}
CHAIN_HEADS = Set {"identifier", "constant", "instance_variable", "class_variable", "self", "scope_resolution"}
Nodes a receiver chain can start with: user, User, @user, @@x,
self, Admin::Health.
COMMAND_TAIL = /\A[ \t]+(?:[:'"]|@{1,2}[A-Za-z_]|[A-Za-z_])/
What a name with no receiver and no arguments must be followed by on
its line to read as a call: authenticate! if x, foo bar.
HEREDOC_OPENER = /<<[~-]?(["'`]?)([A-Za-z_]\w*)\1/
PARAMETER_LISTS = Set {"method_parameters", "block_parameters", "lambda_parameters"}
RAILS_FORMAT_CALLS = Set {"html", "json", "js", "xml", "rss", "atom", "turbo_stream", "api"}
RAILS_RESPONSE_DSL = Set {"respond_to"}
REQUEST_ACCESSORS = Set {"get", "post", "put", "patch", "delete", "xhr", "xhr?", "remote_ip", "raw_post"}
RESERVED = Set {"alias", "and", "begin", "break", "case", "class", "def", "defined?", "do", "else", "elsif", "end", "ensure", "false", "for", "if", "in", "module", "next", "nil", "not", "or", "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless", "until", "when", "while", "yield"}
Instance methods
The callees of every def in source (a whole file), by method name;
a later def of one name replaces an earlier one, as Ruby does.
The callees of a method or block body given as text, start_line being
the 1-based file line its first line sits on.