Module: NBA::DraftBoard::PickAttributes Private
- Defined in:
- lib/nba/draft_board.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Extracts pick attributes from data
Class Method Summary collapse
-
.draft_info(data) ⇒ Hash
private
Extracts draft info attributes from data.
-
.extract(data) ⇒ Hash
private
Extracts all pick attributes from data.
-
.physical(data) ⇒ Hash
private
Extracts physical attributes from data.
-
.player(data) ⇒ Hash
private
Extracts player attributes from data.
-
.team(data) ⇒ Hash
private
Extracts team attributes from data.
Class Method Details
.draft_info(data) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Extracts draft info attributes from data
100 101 102 103 |
# File 'lib/nba/draft_board.rb', line 100 def self.draft_info(data) {season: data["SEASON"], round_number: data["ROUND_NUMBER"], round_pick: data["ROUND_PICK"], overall_pick: data["OVERALL_PICK"]} end |
.extract(data) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Extracts all pick attributes from data
84 85 86 |
# File 'lib/nba/draft_board.rb', line 84 def self.extract(data) player(data).merge(draft_info(data)).merge(team(data)).merge(physical(data)) end |
.physical(data) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Extracts physical attributes from data
119 120 121 122 123 |
# File 'lib/nba/draft_board.rb', line 119 def self.physical(data) {height: data["HEIGHT"], weight: data["WEIGHT"], position: data["POSITION"], jersey_number: data["JERSEY_NUMBER"], birthdate: data["BIRTHDATE"], age: data["AGE"]} end |
.player(data) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Extracts player attributes from data
92 93 94 |
# File 'lib/nba/draft_board.rb', line 92 def self.player(data) {person_id: data["PERSON_ID"], player_name: data["PLAYER_NAME"]} end |
.team(data) ⇒ Hash
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Extracts team attributes from data
109 110 111 112 113 |
# File 'lib/nba/draft_board.rb', line 109 def self.team(data) {team_id: data["TEAM_ID"], team_city: data["TEAM_CITY"], team_name: data["TEAM_NAME"], team_abbreviation: data["TEAM_ABBREVIATION"], organization: data["ORGANIZATION"], organization_type: data["ORGANIZATION_TYPE"]} end |