Module: PlayerFinder
- Included in:
- ESPNNBAFantasy::League, ESPNNBAFantasy::Team
- Defined in:
- lib/espn_nba_fantasy/player_finder.rb
Overview
finds player given the roster (as “arr”) and name (as “matcher”)
Instance Method Summary collapse
Instance Method Details
#find_players(arr, matcher) ⇒ Object
5 6 7 |
# File 'lib/espn_nba_fantasy/player_finder.rb', line 5 def find_players(arr, matcher) arr.select{|p| p.full_name.downcase == matcher.downcase}.first end |