From: Mark T on
Can I extend a class to add an attr_accessor?
So that getter & setter are created?

MarkT

From: Robert Klemme on
On 15.04.2010 05:30, Mark T wrote:
> Can I extend a class to add an attr_accessor?
> So that getter& setter are created?

Yes.

> How?

class AnyClass
attr_accessor :foo
end

Kind regards

robert

--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/