Class: NbaRb::Player::OpponentSplits
- Inherits:
-
PlayerDashboard
- Object
- PlayerDashboard
- NbaRb::Player::OpponentSplits
- Defined in:
- lib/nba_rb/player/opponent_splits.rb,
lib/nba_rb/player/player_opponent_splits.rb
Instance Method Summary collapse
- #by_conference ⇒ Object
- #by_division ⇒ Object
- #by_opponent ⇒ Object
- #vs_division(division) ⇒ Object
- #vs_east ⇒ Object
- #vs_team(team) ⇒ Object
- #vs_west ⇒ Object
Instance Method Details
#by_conference ⇒ Object
6 7 8 |
# File 'lib/nba_rb/player/opponent_splits.rb', line 6 def by_conference create_stats_hash(@data[1]) end |
#by_division ⇒ Object
18 19 20 |
# File 'lib/nba_rb/player/opponent_splits.rb', line 18 def by_division create_stats_hash(@data[2]) end |
#by_opponent ⇒ Object
28 29 30 |
# File 'lib/nba_rb/player/opponent_splits.rb', line 28 def by_opponent create_stats_hash(@data[3]) end |
#vs_division(division) ⇒ Object
22 23 24 25 26 |
# File 'lib/nba_rb/player/opponent_splits.rb', line 22 def vs_division(division) by_division.each do |hash| return hash if hash['GROUP_VALUE'].downcase.include? division.downcase end end |
#vs_east ⇒ Object
10 11 12 |
# File 'lib/nba_rb/player/opponent_splits.rb', line 10 def vs_east by_conference[0] end |
#vs_team(team) ⇒ Object
32 33 34 35 36 |
# File 'lib/nba_rb/player/opponent_splits.rb', line 32 def vs_team(team) by_opponent.each do |hash| return hash if hash['GROUP_VALUE'].downcase.include? team.downcase end end |
#vs_west ⇒ Object
14 15 16 |
# File 'lib/nba_rb/player/opponent_splits.rb', line 14 def vs_west by_conference[1] end |