ara.t.howard schrieb:

> class Class
>   def fattr a, &b
>     define_method(a){ instance_eval &b }
>   end
> end
>
> class C
>   fattr(:a){ 40 }
>   fattr(:b){ a + 2 }
> end
> c = C.new
> p c.b   
> # => 42
> with this approach there is simply no variable to modify - it exists  
> only through closure.

But a method to modify:
class C
  fattr(:b){ 17 }
end
p c.b  # => 17

Or did I get something wrong?

Sven