From: Marcin Wolski Date: 2010-05-25T16:33:45+09:00 Subject: Re: Redefine a Class? Mark T wrote: > I'm looking for something... kinda 'destructive'.... > > class Soda > def initialize > @brand = "SweetenedSugar" end > > def retrieve_brand > return @brand end end > > Soda.removeClassAndMethods # yet to be (found) or > implemented method..... > > irb(main):001:0> Soda.retrieve_brand > NameError: uninitialized constant Soda > from (irb):1 > #---------------------------- ^ yep, this error is what I'm looking > for..... > > MarkT You can remove a method as follows: class Soda remove_method :retrieve_brand end -- Posted via http://www.ruby-forum.com/.