From: Steve Wilhelm Date: 2009-12-10T16:08:02+09:00 Subject: Re: help solving problem in ruby Govinda Khanal wrote: > yes, i skipped the first part. thanx for your help... For the sake of other beginners, added initialize and a puts to last line. Note, last line could be simplified to 'puts song'. class Song def initialize(name, artist, duration) @name, @artist, @duration = name, artist, duration end def to_s "Song: #@name--#@artist (#@duration)" end end song = Song.new("Bicylops", "Fleck", "2.60") puts song.to_s # => Song: Bicylops--Fleck (2.60) -- Posted via http://www.ruby-forum.com/.