Skip to content

Commit 22830c7

Browse files
committed
Ruby: Address review comments
1 parent 4c6855e commit 22830c7

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

ruby/ql/src/utils/modeleditor/ModelEditor.qll

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ abstract class Endpoint instanceof DataFlow::Node {
6161
/**
6262
* A callable method or accessor from source code.
6363
*/
64-
class MethodEndpoint extends Endpoint {
64+
class MethodEndpoint extends Endpoint instanceof DataFlow::MethodNode {
6565
MethodEndpoint() {
66-
this.(DataFlow::MethodNode).isPublic() and
66+
this.isPublic() and
6767
not isUninteresting(this)
6868
}
6969

7070
DataFlow::MethodNode getNode() { result = this }
7171

72-
override string getName() { result = this.(DataFlow::MethodNode).getMethodName() }
72+
override string getName() { result = super.getMethodName() }
7373

7474
/**
7575
* Gets the unbound type name of this endpoint.
@@ -91,15 +91,10 @@ class MethodEndpoint extends Endpoint {
9191
result =
9292
"(" +
9393
concat(string key, string value |
94-
value =
95-
any(int i |
96-
i.toString() = key
97-
|
98-
this.(DataFlow::MethodNode).asCallable().getParameter(i)
99-
).getName()
94+
value = any(int i | i.toString() = key | super.asCallable().getParameter(i)).getName()
10095
or
10196
exists(DataFlow::ParameterNode param |
102-
param = this.(DataFlow::MethodNode).asCallable().getKeywordParameter(key)
97+
param = super.asCallable().getKeywordParameter(key)
10398
|
10499
value = key + ":"
105100
)

0 commit comments

Comments
 (0)