module Noir::RubyCalleeExtractor

Extended Modules

Defined in:

miniparsers/ruby_callee_extractor.cr

Constant Summary

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"}
BARE_CALL_REGEX = /(?<![.\w:])([a-z_][\w]*[!?=]?)(?:\s*\(|(?=\s+(?:[:'"]|@{1,2}[A-Za-z_]|[A-Za-z_][\w]*[!?=]?)))/
RAILS_FORMAT_CALLS = Set {"html", "json", "js", "xml", "rss", "atom", "turbo_stream", "api"}
RAILS_RESPONSE_DSL = Set {"respond_to"}
RECEIVER_CALL_REGEX = /((?:@{1,2})?[A-Za-z_][\w]*(?:::[A-Za-z_][\w]*)*(?:\.[A-Za-z_][\w]*[!?=]?)+)\s*(\()?/
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 Method Summary

Instance Method Detail

def attach_to(endpoint : Endpoint, callees : Array(Entry)) #

[View source]
def callees_for_body(body : String, file_path : String, start_line : Int32) : Array(Entry) #

[View source]
def strip_comment(line : String, preserve_strings : Bool = false) : String #

[View source]