CodeQL library for Ruby
codeql/ruby-all 0.8.15-dev (changelog, source)
Search

Class DataFlow::ModuleNode

A representation of a run-time module or class.

This is equivalent to the type Ast::Module but provides data-flow specific methods.

Import path

import ruby

Known direct subtypes

Predicates

getADeclaration

Gets a declaration of this module, if any.

getADescendent

Gets a module that transitively subclasses, includes, or prepends this module.

getAModuleLevelCall

Gets a call to method name on self in the module-level scope of this module.

getAPrependedModule

Gets a prepended module.

getASubClass

Gets an immediate sub class of this module, if any.

getAnAncestor

Gets a module that is transitively subclassed, included, or prepended by this module.

getAnAncestorExpr

Gets the expression node denoting the super class or an included or prepended module.

getAnImmediateAncestor

Gets the super class or an included or prepended module.

getAnImmediateDescendent

Gets a direct subclass or module including or prepending this one.

getAnImmediateReference

Gets a constant or self variable that refers to this module.

getAnIncludedModule

Gets an included module.

getAnInstanceMethod

Gets an instance method available in this module, including methods inherited from ancestors.

getAnInstanceSelf

Gets the self parameter of an instance method available in this module, including those inherited from ancestors.

getAnOwnInstanceMethod

Gets an instance method declared in this module.

getAnOwnInstanceSelf

Gets the self parameter of an instance method declared in this module.

getAnOwnInstanceVariableRead

Gets an access to the instance variable name in this module.

getAnOwnInstanceVariableWriteValue

Gets the right-hand side of an assignment to the instance variable name in this module.

getAnOwnModuleSelf

Gets self in the module declaration or in one of its singleton methods.

getAnOwnSingletonMethod

Gets a singleton method declared in this module (or in a singleton class augmenting this module).

getInstanceMethod

Gets the instance method named name available in this module, including methods inherited from ancestors.

getLocation

Gets the location of this module.

getModuleLevelSelf

Gets self in a declaration of this module.

getNestedModule

Gets a module named name declared inside this one (not aliased), provided that such a module is defined or reopened in the current codebase.

getOwnInstanceMethod

Gets an instance method named name declared in this module.

getOwnSingletonMethod

Gets the singleton method named name declared in this module (or in a singleton class augmenting this module).

getParentModule

Gets the enclosing module, as it appears in the qualified name of this module.

getQualifiedName

Gets the qualified name of this module, if any.

getSuperClass

Gets the super class of this module, if any.

isBuiltin

Holds if this is a built-in module, e.g. Object.

isClass

Holds if this module is a class.

toString

Gets a textual representation of this module.

trackInstance

Starts tracking instances of this module forward using API graphs.

trackModule

Starts tracking the module object using API graphs.