Class: Sportradar::Nba::Models::OnCourtPlayer
- Inherits:
-
Object
- Object
- Sportradar::Nba::Models::OnCourtPlayer
- Defined in:
- lib/sportradar/nba/models/on_court_player.rb
Instance Method Summary collapse
- #event_id ⇒ Object
- #full_name ⇒ Object
-
#initialize(attributes = {}) ⇒ OnCourtPlayer
constructor
A new instance of OnCourtPlayer.
- #player_id ⇒ Object
- #team_id ⇒ Object
- #team_name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ OnCourtPlayer
Returns a new instance of OnCourtPlayer.
5 6 7 |
# File 'lib/sportradar/nba/models/on_court_player.rb', line 5 def initialize(attributes = {}) @attributes = attributes end |
Instance Method Details
#event_id ⇒ Object
19 20 21 |
# File 'lib/sportradar/nba/models/on_court_player.rb', line 19 def event_id @attributes.dig('event_id') end |
#full_name ⇒ Object
27 28 29 |
# File 'lib/sportradar/nba/models/on_court_player.rb', line 27 def full_name @attributes.dig('full_name') end |
#player_id ⇒ Object
23 24 25 |
# File 'lib/sportradar/nba/models/on_court_player.rb', line 23 def player_id @attributes.dig('player_id') end |
#team_id ⇒ Object
31 32 33 |
# File 'lib/sportradar/nba/models/on_court_player.rb', line 31 def team_id @attributes.dig('team_id') end |
#team_name ⇒ Object
35 36 37 |
# File 'lib/sportradar/nba/models/on_court_player.rb', line 35 def team_name @attributes.dig('team_name') end |
#to_s ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/sportradar/nba/models/on_court_player.rb', line 9 def to_s [].tap do |sentence_parts| sentence_parts << event_id sentence_parts << player_id sentence_parts << full_name sentence_parts << team_id sentence_parts << team_name end.join(' - ') end |