From: "Brian Schröder" Date: 2005-10-29T00:08:18+09:00 Subject: Re: append_feathers On 28/10/05, David A. Black wrote: > Hi -- > > On Fri, 28 Oct 2005, Brian Schr�der wrote: > > > On 27/10/05, David A. Black wrote: > >> Hi -- > >> > >> I just accidentally typed "append_feathers" instead of > >> "append_features" in something I was writing. I thought maybe this > >> would be of use to those of you who are fond of nomenclature drawn > >> from the mallard sphere :-) > >> > >> > >> David > >> > >> -- > >> David A. Black > >> dblack@wobblini.net > >> > >> > > > > --- > > module Kernel > > Probably better to put it in Module. > > > def append_feathers > > class_eval do > > def fly > > if %w(Penguin Dodo).include?self.class.to_s > > Or: > > if [Penguin, Dodo].include?(self.class) > > though testing for class ancestry is kind of unducklike, isn't it? :-) > Oh, thats true. I wanted to escape the problem of undefined constants, but they will pop in existence here. Too much thinking on my part :-( cheers, Brian > > And now let's see whether upgrading pine will cause my reply to you > not to be all weird like they were in the past.... :-) > > > David > > -- > David A. Black > dblack@wobblini.net > > -- http://ruby.brian-schroeder.de/ Stringed instrument chords: http://chordlist.brian-schroeder.de/