Skip to content

Commit 611ed93

Browse files
committed
Ruby: add is{Public,Protected,Private} to DataFlow::MethodNode
1 parent 199b3f4 commit 611ed93

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ruby/ql/lib/codeql/ruby/dataflow/internal/DataFlowPublic.qll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,15 @@ class MethodNode extends CallableNode {
10581058

10591059
/** Gets the name of this method. */
10601060
string getMethodName() { result = this.asCallableAstNode().getName() }
1061+
1062+
/** Holds if this method is public. */
1063+
predicate isPublic() { this.asCallableAstNode().isPublic() }
1064+
1065+
/** Holds if this method is private. */
1066+
predicate isPrivate() { this.asCallableAstNode().isPrivate() }
1067+
1068+
/** Holds if this method is protected. */
1069+
predicate isProtected() { this.asCallableAstNode().isProtected() }
10611070
}
10621071

10631072
/**

0 commit comments

Comments
 (0)