So...what I mean is:
class Test {
var a: String?
var b: String?
}
is it possible to have a function that updates either a or b based on an argument?
a bit like
func updateTest(_ attribute: Test.attribute,_ updateTo: String){
attribute = updateTo
}
then call like:
var test = Test()
updateTest(test.b, "foo")
print(test.b) // foo