From: Rob Boellaard Date: 2002-02-02T21:40:14+09:00 Subject: Re: [newbie] RubyWin question This is a multi-part message in MIME format. ------=_NextPart_000_00A5_01C1ABEE.0BBEBBE0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi!, Well, I guess it should be "puts aSong.inspect". Sorry for the noise. Rob ----- Original Message -----=20 From: Rob Boellaard=20 To: ruby-talk ML=20 Sent: Saturday, February 02, 2002 12:43 PM Subject: [newbie] RubyWin question =20 Hi everybody, I am just getting started with Ruby and I am going through the = "Programming Ruby" book. I have a question about how to work RubyWin = (probably very simple) while this works: def sayGoodnight(name) result =3D "Goodnight, " + name return result end sayGoodnight("Rob") [Ctrl E] Goodnight, Rob This does not work (there is no output): class Song def initialize (name, artist, duration) @name =3D name @artist =3D artist @duration =3D duration end end aSong =3D Song.new("Valse sem Nome", "Baden Powell", 536) aSong.inspect [Ctrl E] Please help :-) tnx Rob ------=_NextPart_000_00A5_01C1ABEE.0BBEBBE0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
  Hi!,
 
  Well, I guess it should be "puts = aSong.inspect".
  Sorry for the = noise.
 
  Rob
----- Original Message -----
From:=20 Rob=20 Boellaard
To: ruby-talk ML
Sent: Saturday, February 02, = 2002 12:43=20 PM
Subject: [newbie] RubyWin = question

   
  Hi everybody,
 
  I am just getting started with = Ruby and I=20 am going through the "Programming Ruby" book. I have a question about = how to=20 work RubyWin (probably very simple)
 
  while this works:
 
=
def sayGoodnight(name)
  result =3D "Goo= dnight, " + name
  return result
end<= BR>
sayGoodnight("Rob")
 
 [Ctrl E]
 
Goodnight, Rob
 
This does not work (there is no=20 output):
 
class Song
  def initialize = (name,=20 artist, duration)
    @name =3D = name
   =20 @artist =3D artist
    @duration =3D = duration
 =20 end
end
 
aSong =3D Song.new("Valse sem Nome", = "Baden=20 Powell", 536)

aSong.inspect
 [Ctrl E]
 
 
  Please help :-)
 
  tnx
  Rob
------=_NextPart_000_00A5_01C1ABEE.0BBEBBE0--