Markus Werner wrote:
> access. IMHO The best would be a pre and a posthook.
You can already have that kind of thing.
attr_ are actually simply another way to write the following methods:
def variable
@variable
end
def variable=(value)
@variable=value
end
If you write these methods yourself instead of using the
attr_-construct, you can do whatever you want in the methods and it
still looks the same to everyone who uses your class.
Greetings,
Henrik