Sha256: fe075590da9516b3a28ba38ad4dcb6775201d3cb16b6801c9a44337073c71e72
Contents?: true
Size: 314 Bytes
Versions: 106
Compression:
Stored size: 314 Bytes
Contents
class Roster attr_reader :teams def initialize @teams = [] end def enroll(player) team_name = player.team team = @teams.find { |team| team.name == team_name } unless team team = Team.new(team_name) @teams << team end team.enlist(player) end end
Version data entries
106 entries across 106 versions & 1 rubygems