Skip to content

Commit 0442631

Browse files
committed
Ruby: Only generate models for public methods
1 parent c265c15 commit 0442631

File tree

1 file changed

+1
-0
lines changed
  • ruby/ql/src/queries/modeling/internal

1 file changed

+1
-0
lines changed

ruby/ql/src/queries/modeling/internal/Util.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ string getArgumentPath(DataFlow::ParameterNode paramNode) {
4343
*/
4444
predicate pathToMethod(DataFlow::MethodNode method, string type, string path) {
4545
method.getLocation().getFile() instanceof RelevantFile and
46+
method.isPublic() and // only public methods are modeled
4647
exists(DataFlow::ModuleNode mod, string methodName |
4748
method = mod.getOwnInstanceMethod(methodName) and
4849
if methodName = "initialize"

0 commit comments

Comments
 (0)