G
Govinda Khanal
i am a beginner and having problem in linux with this code:
class Song
def to_s
"Song: #@name--#@artist (#@duration)"
end
end
song = Song.new("Bicylops", "Fleck", "2.60")
song.to_s
=> the output looks like this:
a.rb:6:in `initialize': wrong number of arguments (3 for 0)
(ArgumentError)
from a.rb:6:in `new'
from a.rb:6
class Song
def to_s
"Song: #@name--#@artist (#@duration)"
end
end
song = Song.new("Bicylops", "Fleck", "2.60")
song.to_s
=> the output looks like this:
a.rb:6:in `initialize': wrong number of arguments (3 for 0)
(ArgumentError)
from a.rb:6:in `new'
from a.rb:6