Ruby: add is{Public,Protected,Private} to DataFlow::MethodNode

This commit is contained in:
Nick Rolfe
2022-11-09 15:18:16 +00:00
parent 199b3f4d71
commit 611ed93e39

View File

@@ -1058,6 +1058,15 @@ class MethodNode extends CallableNode {
/** Gets the name of this method. */
string getMethodName() { result = this.asCallableAstNode().getName() }
/** Holds if this method is public. */
predicate isPublic() { this.asCallableAstNode().isPublic() }
/** Holds if this method is private. */
predicate isPrivate() { this.asCallableAstNode().isPrivate() }
/** Holds if this method is protected. */
predicate isProtected() { this.asCallableAstNode().isProtected() }
}
/**