File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
ruby/ql/lib/codeql/ruby/dataflow/internal Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1010,6 +1010,23 @@ class ModuleNode instanceof Module {
10101010 */
10111011 MethodNode getAnInstanceMethod ( ) { result = this .getInstanceMethod ( _) }
10121012
1013+ /**
1014+ * Gets the singleton method named `name` available in this module, including methods inherited from ancestors.
1015+ *
1016+ * Overridden methods are not included.
1017+ */
1018+ MethodNode getSingletonMethod ( string name ) {
1019+ result .asCallableAstNode ( ) = super .getAnOwnSingletonMethod ( ) and
1020+ result .getMethodName ( ) = name
1021+ }
1022+
1023+ /**
1024+ * Gets a singleton method available in this module, including methods inherited from ancestors.
1025+ *
1026+ * Overridden methods are not included.
1027+ */
1028+ MethodNode getASingletonMethod ( ) { result = this .getSingletonMethod ( _) }
1029+
10131030 /**
10141031 * Gets the enclosing module, as it appears in the qualified name of this module.
10151032 *
You can’t perform that action at this time.
0 commit comments