Ruby: simplify getSetterCallAttributeName

This commit is contained in:
Asger F
2022-09-01 11:43:51 +02:00
parent a51a540582
commit a64f7cd146

View File

@@ -214,10 +214,7 @@ predicate postUpdateStoreStep(Node nodeFrom, Node nodeTo, TypeTrackerContent con
* ```
*/
private string getSetterCallAttributeName(Ast::SetterMethodCall call) {
// TODO: this should be exposed in `SetterMethodCall`
exists(string setterName |
setterName = call.getMethodName() and result = setterName.prefix(setterName.length() - 1)
)
result = call.getTargetName()
}
/**