Class: FootballManager::TeamSheetCreator

Inherits:
Object
  • Object
show all
Defined in:
lib/football-manager/team_sheet_creator.rb

Class Method Summary collapse

Class Method Details

.create_team_sheet(teams) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/football-manager/team_sheet_creator.rb', line 3

def self.create_team_sheet(teams)
  teams.each do |team|
    puts "Team #{teams.first == team ? 'Bibs' : 'Colours'} have #{team.size} player#{'s' if team.size > 1} and #{team.points} points"
  end
  puts ''
  teams.each do |team|
    puts "Team #{teams.first == team ? 'Bibs' : 'Colours'}"
    puts '--------'
    team.players_ordered_by_name.each do |player|
      puts player.name
    end
    puts ''
  end
end