@@ -57,36 +57,40 @@ module Gem {
57
57
}
58
58
59
59
/** Gets the name of the gem */
60
- string getName ( ) { result = getSpecProperty ( "name" ) .getConstantValue ( ) .getString ( ) }
60
+ string getName ( ) { result = this . getSpecProperty ( "name" ) .getConstantValue ( ) .getString ( ) }
61
61
62
62
/** Gets a path that is loaded when the gem is required */
63
63
private string getARequirePath ( ) {
64
- result = getSpecProperty ( [ "require_paths" , "require_path" ] ) .getConstantValue ( ) .getString ( )
64
+ result =
65
+ this .getSpecProperty ( [ "require_paths" , "require_path" ] ) .getConstantValue ( ) .getString ( )
65
66
or
66
- not exists ( getSpecProperty ( [ "require_paths" , "require_path" ] ) .getConstantValue ( ) .getString ( ) ) and
67
+ not exists (
68
+ this .getSpecProperty ( [ "require_paths" , "require_path" ] ) .getConstantValue ( ) .getString ( )
69
+ ) and
67
70
result = "lib" // the default is "lib"
68
71
}
69
72
70
73
/** Gets a file that could be loaded when the gem is required. */
71
74
private File getAPossiblyRequiredFile ( ) {
72
- result = File .super .getParentContainer ( ) .getFolder ( getARequirePath ( ) ) .getAChildContainer * ( )
75
+ result =
76
+ File .super .getParentContainer ( ) .getFolder ( this .getARequirePath ( ) ) .getAChildContainer * ( )
73
77
}
74
78
75
79
/** Gets a class/module that is exported by this gem. */
76
80
private ModuleBase getAPublicModule ( ) {
77
- result .( Toplevel ) .getLocation ( ) .getFile ( ) = getAPossiblyRequiredFile ( )
81
+ result .( Toplevel ) .getLocation ( ) .getFile ( ) = this . getAPossiblyRequiredFile ( )
78
82
or
79
- result = getAPublicModule ( ) .getAModule ( )
83
+ result = this . getAPublicModule ( ) .getAModule ( )
80
84
or
81
- result = getAPublicModule ( ) .getAClass ( )
85
+ result = this . getAPublicModule ( ) .getAClass ( )
82
86
or
83
- result = getAPublicModule ( ) .getStmt ( _) .( SingletonClass )
87
+ result = this . getAPublicModule ( ) .getStmt ( _) .( SingletonClass )
84
88
}
85
89
86
90
/** Gets a parameter from an exported method, which is an input to this gem. */
87
91
DataFlow:: ParameterNode getAnInputParameter ( ) {
88
92
exists ( MethodBase method |
89
- method = getAPublicModule ( ) .getAMethod ( ) and
93
+ method = this . getAPublicModule ( ) .getAMethod ( ) and
90
94
result .getParameter ( ) = method .getAParameter ( )
91
95
|
92
96
method .isPublic ( )
0 commit comments