Class: FootballManager::PlayersCreator
- Inherits:
-
Object
- Object
- FootballManager::PlayersCreator
- Defined in:
- lib/football-manager/players_creator.rb
Class Attribute Summary collapse
-
.player_match ⇒ Object
Returns the value of attribute player_match.
Class Method Summary collapse
Class Attribute Details
.player_match ⇒ Object
Returns the value of attribute player_match.
5 6 7 |
# File 'lib/football-manager/players_creator.rb', line 5 def player_match @player_match end |
Class Method Details
.create_players(player_data) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/football-manager/players_creator.rb', line 7 def create_players(player_data) player_data.collect do |player| player =~ player_pattern if self.player_match = Regexp.last_match FootballManager::Player.new(name, skill) end end.compact end |