Class: NBA::PlayerInfo
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::PlayerInfo
- Defined in:
- lib/nba/player_info.rb
Overview
Represents detailed player biographical information
Instance Attribute Summary collapse
-
#birthdate ⇒ String
Returns the player’s birthdate.
-
#country ⇒ String
Returns the player’s country.
-
#display_name ⇒ String
Returns the player’s display name.
-
#draft_number ⇒ Integer
Returns the pick number.
-
#draft_round ⇒ Integer
Returns the round the player was drafted.
-
#draft_year ⇒ Integer
Returns the year the player was drafted.
-
#first_name ⇒ String
Returns the player’s first name.
-
#from_year ⇒ Integer
Returns the player’s first NBA year.
-
#greatest_75_flag ⇒ String
Returns whether the player is in the NBA 75 greatest.
-
#height ⇒ String
Returns the player’s height.
-
#jersey ⇒ String
Returns the player’s jersey number.
-
#last_name ⇒ String
Returns the player’s last name.
-
#player_id ⇒ Integer
Returns the player ID.
-
#position ⇒ String
Returns the player’s position.
-
#school ⇒ String
Returns the player’s school.
-
#season_exp ⇒ Integer
Returns the player’s years of experience.
-
#team_abbreviation ⇒ String
Returns the player’s team abbreviation.
-
#team_city ⇒ String
Returns the player’s team city.
-
#team_id ⇒ Integer
Returns the player’s team ID.
-
#team_name ⇒ String
Returns the player’s team name.
-
#to_year ⇒ Integer
Returns the player’s most recent NBA year.
-
#weight ⇒ Integer
Returns the player’s weight in pounds.
Instance Method Summary collapse
-
#full_name ⇒ String
Returns the player’s full name.
-
#greatest_75? ⇒ Boolean
Returns whether the player is in the NBA 75 greatest.
-
#player ⇒ Player?
Returns the player object.
-
#team ⇒ Team?
Returns the team object.
Instance Attribute Details
#birthdate ⇒ String
Returns the player’s birthdate
47 |
# File 'lib/nba/player_info.rb', line 47 attribute :birthdate, Shale::Type::String |
#country ⇒ String
Returns the player’s country
63 |
# File 'lib/nba/player_info.rb', line 63 attribute :country, Shale::Type::String |
#display_name ⇒ String
Returns the player’s display name
39 |
# File 'lib/nba/player_info.rb', line 39 attribute :display_name, Shale::Type::String |
#draft_number ⇒ Integer
Returns the pick number
159 |
# File 'lib/nba/player_info.rb', line 159 attribute :draft_number, Shale::Type::Integer |
#draft_round ⇒ Integer
Returns the round the player was drafted
151 |
# File 'lib/nba/player_info.rb', line 151 attribute :draft_round, Shale::Type::Integer |
#draft_year ⇒ Integer
Returns the year the player was drafted
143 |
# File 'lib/nba/player_info.rb', line 143 attribute :draft_year, Shale::Type::Integer |
#first_name ⇒ String
Returns the player’s first name
23 |
# File 'lib/nba/player_info.rb', line 23 attribute :first_name, Shale::Type::String |
#from_year ⇒ Integer
Returns the player’s first NBA year
167 |
# File 'lib/nba/player_info.rb', line 167 attribute :from_year, Shale::Type::Integer |
#greatest_75_flag ⇒ String
Returns whether the player is in the NBA 75 greatest
183 |
# File 'lib/nba/player_info.rb', line 183 attribute :greatest_75_flag, Shale::Type::String |
#height ⇒ String
Returns the player’s height
71 |
# File 'lib/nba/player_info.rb', line 71 attribute :height, Shale::Type::String |
#jersey ⇒ String
Returns the player’s jersey number
95 |
# File 'lib/nba/player_info.rb', line 95 attribute :jersey, Shale::Type::String |
#last_name ⇒ String
Returns the player’s last name
31 |
# File 'lib/nba/player_info.rb', line 31 attribute :last_name, Shale::Type::String |
#player_id ⇒ Integer
Returns the player ID
15 |
# File 'lib/nba/player_info.rb', line 15 attribute :player_id, Shale::Type::Integer |
#position ⇒ String
Returns the player’s position
103 |
# File 'lib/nba/player_info.rb', line 103 attribute :position, Shale::Type::String |
#school ⇒ String
Returns the player’s school
55 |
# File 'lib/nba/player_info.rb', line 55 attribute :school, Shale::Type::String |
#season_exp ⇒ Integer
Returns the player’s years of experience
87 |
# File 'lib/nba/player_info.rb', line 87 attribute :season_exp, Shale::Type::Integer |
#team_abbreviation ⇒ String
Returns the player’s team abbreviation
127 |
# File 'lib/nba/player_info.rb', line 127 attribute :team_abbreviation, Shale::Type::String |
#team_city ⇒ String
Returns the player’s team city
135 |
# File 'lib/nba/player_info.rb', line 135 attribute :team_city, Shale::Type::String |
#team_id ⇒ Integer
Returns the player’s team ID
111 |
# File 'lib/nba/player_info.rb', line 111 attribute :team_id, Shale::Type::Integer |
#team_name ⇒ String
Returns the player’s team name
119 |
# File 'lib/nba/player_info.rb', line 119 attribute :team_name, Shale::Type::String |
#to_year ⇒ Integer
Returns the player’s most recent NBA year
175 |
# File 'lib/nba/player_info.rb', line 175 attribute :to_year, Shale::Type::Integer |
#weight ⇒ Integer
Returns the player’s weight in pounds
79 |
# File 'lib/nba/player_info.rb', line 79 attribute :weight, Shale::Type::Integer |
Instance Method Details
#full_name ⇒ String
Returns the player’s full name
211 212 213 |
# File 'lib/nba/player_info.rb', line 211 def full_name display_name || "#{first_name} #{last_name}".strip end |
#greatest_75? ⇒ Boolean
Returns whether the player is in the NBA 75 greatest
221 222 223 |
# File 'lib/nba/player_info.rb', line 221 def greatest_75? greatest_75_flag.eql?("Y") end |
#player ⇒ Player?
Returns the player object
191 192 193 |
# File 'lib/nba/player_info.rb', line 191 def player Players.find(player_id) end |
#team ⇒ Team?
Returns the team object
201 202 203 |
# File 'lib/nba/player_info.rb', line 201 def team Teams.find(team_id) end |