blob: 598b5f4aa528a4a9e2a0e7d3d95a665bdee59d7c (
plain) (
tree)
|
|
class Member
attr_reader :name, :instrument, :age
def initialize(params = nil)
if params
@name = params['name']
@instrument = params['instrument']
@age = params['age'].to_i
else
@name = ''
@instrument = ''
@age = 0
end
end
def to_s
[name, instrument, age].join(', ')
end
end
|