Skip to content

Commit 9125b85

Browse files
committed
Ruby: Add missing QL doc
1 parent 92453bd commit 9125b85

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ruby/ql/lib/codeql/ruby/ast/Scope.qll

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@ private import internal.AST
33
private import internal.Scope
44
private import internal.TreeSitter
55

6+
/**
7+
* A variable scope. This is either a top-level (file), a module, a class,
8+
* or a callable.
9+
*/
610
class Scope extends AstNode, TScopeType instanceof ScopeImpl {
11+
/** Gets the outer scope, if any. */
712
Scope getOuterScope() { result = super.getOuterScopeImpl() }
813

14+
/** Gets a variable declared in this scope. */
915
Variable getAVariable() { result = super.getAVariableImpl() }
1016

17+
/** Gets the variable named `name` declared in this scope. */
1118
Variable getVariable(string name) { result = super.getVariableImpl(name) }
1219
}
1320

21+
/** A scope in which a `self` variable exists. */
1422
class SelfScope extends Scope, TSelfScopeType { }

0 commit comments

Comments
 (0)