In article <d393d2832e1f94df7d765538b9973fe4@ruby-forum.com>,
I have told that if the value of the variable is changed via a sitter,
it's possible to use a method chaining. How if there is no setter ?
What kind of variable? Global, local, instance? For the latter you could
write your own attr_accessor method that either creates a call to a
custom method or uses update() of Observer.
Thanks for the answer ... if fact when it's an instance variable, it's
possible to (re)define the setter... the problem is when the variable is
local.
I checked the use of trace_var, and as Avdi said, it's only used to
trace global variables assignments.
Even if you change the setter, you won't be able to trace direct assignment.
Regards,
Florian Gilcher
···
On Jun 14, 2008, at 3:07 PM, Mehdi Adda wrote:
Tobias Weber wrote:
In article <d393d2832e1f94df7d765538b9973fe4@ruby-forum.com>,
Mehdi Adda <mehdi.adda@gmail.com> wrote:
I have told that if the value of the variable is changed via a sitter,
it's possible to use a method chaining. How if there is no setter ?
What kind of variable? Global, local, instance? For the latter you could
write your own attr_accessor method that either creates a call to a
custom method or uses update() of Observer.
Thanks for the answer ... if fact when it's an instance variable, it's
possible to (re)define the setter... the problem is when the variable is
local.
I checked the use of trace_var, and as Avdi said, it's only used to
trace global variables assignments.