1 2 3 4 5 6 7 8 9 10 11 12 13
class Member attr_reader :name, :instrument, :age def initialize(params) @name = params['name'] @instrument = params['instrument'] @age = params['age'].to_i end def to_s [name, instrument, age].join(', ') end end