From: Vincent Foley Date: 2001-11-06T03:24:52+09:00 Subject: [ruby-talk:24412] Re: Help with OO > class MyString < String > def intitialize(s) > super(s) > end > > def l33t > self.tr!('eE', '3') > self.tr!('aA', '4') > self.tr!('lL', '1') > self.tr!('oO', '0') > self.tr!('tT', '7') > self.tr!('sS', '$5') > self > end > end > > > print "Enter string to translate: " > x =MyString.new(STDIN.gets.chomp!) > puts x.l33t What's the use or the initialize thing? And does 'class MyString < String' mean that MyString will be a "sub-class" of String? Vincent -- Do you want Debian CD's for free? If so, go to http://darkhost.mine.nu:81 and send me a email.