M
Matthias Winkelmann
Hi,
I'm trying to overload the [ ] operator. It works fine for read-only
access:
def [](acc)
@myValues[acc]
end
However, I'd also need write access. I've tried:
def [](acc)=(value)
@myValues[acc] = value
end
And get a syntax error on the first line. I'd appreciate any help.
Matt
I'm trying to overload the [ ] operator. It works fine for read-only
access:
def [](acc)
@myValues[acc]
end
However, I'd also need write access. I've tried:
def [](acc)=(value)
@myValues[acc] = value
end
And get a syntax error on the first line. I'd appreciate any help.
Matt