Florian Gilcher
6/14/2008 2:05:00 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
>
>
> Addame
Even if you change the setter, you won't be able to trace direct
assignment.
Regards,
Florian Gilcher
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
iEYEARECAAYFAkhT0DsACgkQJA/zY0IIRZZtMQCcDXUu3UKxEiOi9ixEW3J5LUKr
TaoAoIXU3Dom1cDnzGCoOUmRI0Lt/XDl
=SYa5
-----END PGP SIGNATURE-----