Ruby - Classes and Objects
What will be the output of this Ruby code?
class Score
def initialize(points)
@points = points
end
def to_s
"Points: #{@points}"
end
end
score = Score.new(42)
puts score.to_s