class User
def initialize(name, score)
@name = name
@score = score
end
def get_info
"Name: #{@name}, Score: #{@score}"
end
end
user1 = User.new("Taro", 70)
user2 = User.new("Jiro", 90)
puts user1.get_info
puts user2.get_info
class User
def initialize(name, score)
@name = name
@score = score
end
def get_info
"Name: #{@name}, Score: #{@score}"
end
end
user1 = User.new("Taro", 70)
user2 = User.new("Jiro", 90)
puts user1.get_info
puts user2.get_info