Len Sumnler
11/9/2003 7:35:00 AM
I am just starting to learn Ruby. I am running Ruby under XP and have
entered a code example from the book "Programming Ruby The Pragmatic
Programmer's Guide".
Code example follows;
class Song
def intialize(name, artist, duration)
@name = name
@artist = artist
@duration = duration
end
end
aSong = Song.new("Hey Jude", "Beetles", 260)
aSong.inspect
I get the following error messages.
My_Class.rb:9:in `initialize': wrong number of arguments(3 for 0)
(ArgumentError)
from My_Class.rb:9:in `new'
from My_Class.rb:9
WHY
Len Sumnler