From: "David A. Black" Date: 2008-10-03T20:07:05+09:00 Subject: Re: Problem extending (adding methods) to class Hi -- On Fri, 3 Oct 2008, Nit Khair wrote: > David A. Black wrote: > >> Why not use a module? >> >> module MyForm >> attr_accessor :myfields >> def get_fields >> @myfields >> end >> end >> >> class Ncurses::Form::FORM >> include MyForm >> end >> > Interesting. But sorry if I am missing something. as I understand it, i > can't subclass a module, nor class Ncurses::Form::FORM. So i wont be > able to subclass this, right ? It would still have the same 'new' issue. I'm suggesting, though, that modules might be a good alternative to subclassing. David -- Rails training from David A. Black and Ruby Power and Light: Intro to Ruby on Rails January 12-15 Fort Lauderdale, FL Advancing with Rails January 19-22 Fort Lauderdale, FL * * Co-taught with Patrick Ewing! See http://www.rubypal.com for details and updates!