isn't +
an operator? why would it not be defined?
here's my code:
Class Song
@@plays = 0
def initialize(name, artist, duration)
@name = name
@artist = artist
@duration = duration
@plays = 0
end
attr_reader :name, :artist, :duration,
attr_writer :name, :aritist, :duration
def play
@plays += 1
@@plays += 1
"This Song: #@plays play(s). Total #@@plays plays."
end
def to_s
"Song: #@name--#@artist (#@duration)"
end
end