On 1/27/07, Trans <transfire / gmail.com> wrote:
> Use define_method against local vars.
>
>   class X
>     x = 100
>
>     define_method(:x) do ; x; end
>   end
>
>   X.new.x #=> 10

Whoa!  That's cool!

I love how no matter how long I program in Ruby, I still get pleasant
surprised like this.

Thanks!

--
Avdi