标签: ruby string
class Song def initilaize(name,artist,duration) @name=name @artist=artist @duration=duration end end song = Song.new("ruby","Bicylops " ,260) puts song.artist
答案 0 :(得分:2)
非常简单。
您将initialize拼写为initilaize。
initialize
initilaize