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 {
1010
1010
*/
1011
1011
MethodNode getAnInstanceMethod ( ) { result = this .getInstanceMethod ( _) }
1012
1012
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
+
1013
1030
/**
1014
1031
* Gets the enclosing module, as it appears in the qualified name of this module.
1015
1032
*
You can’t perform that action at this time.
0 commit comments