J
junji
i was trying the tutorials for ruby and they gave this code it seems to
have an error well anyway this is the code so whats wrong with it
class Song2
attr_reader :name, :artist, :duration
end
aSong = Song2.new("Bicylops", "Fleck", 260)
aSong.artist #» "Fleck"
aSong.name #» "Bicylops"
aSong.duration #» 260
can anyone tell me whats wrong here
this is what the error looks like
....4:in `initialize': wrong number of arguments (3 for 0)
(ArgumentError)
from F:/junji/ruby-study/class/song2.rb:4
Thanks all, is there another tutorial for newbies aside from what you
get with FreeRide
have an error well anyway this is the code so whats wrong with it
class Song2
attr_reader :name, :artist, :duration
end
aSong = Song2.new("Bicylops", "Fleck", 260)
aSong.artist #» "Fleck"
aSong.name #» "Bicylops"
aSong.duration #» 260
can anyone tell me whats wrong here
this is what the error looks like
....4:in `initialize': wrong number of arguments (3 for 0)
(ArgumentError)
from F:/junji/ruby-study/class/song2.rb:4
Thanks all, is there another tutorial for newbies aside from what you
get with FreeRide