Class: NBA::Award
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::Award
- Defined in:
- lib/nba/award.rb
Overview
Represents a player’s award
Instance Attribute Summary collapse
-
#all_nba_team_number ⇒ Integer
Returns the All-NBA team number (1st, 2nd, 3rd).
-
#award_type ⇒ String
Returns the award type.
-
#conference ⇒ String
Returns the conference.
-
#description ⇒ String
Returns the award description.
-
#first_name ⇒ String
Returns the player’s first name.
-
#last_name ⇒ String
Returns the player’s last name.
-
#month ⇒ Integer
Returns the month (for monthly awards).
-
#player_id ⇒ Integer
Returns the player ID.
-
#season ⇒ String
Returns the season.
-
#subtype1 ⇒ String
Returns the award subtype 1.
-
#subtype2 ⇒ String
Returns the award subtype 2.
-
#subtype3 ⇒ String
Returns the award subtype 3.
-
#team ⇒ String
Returns the team name.
-
#week ⇒ Integer
Returns the week (for weekly awards).
Instance Method Summary collapse
-
#player ⇒ Player?
Returns the player object.
Instance Attribute Details
#all_nba_team_number ⇒ Integer
Returns the All-NBA team number (1st, 2nd, 3rd)
52 |
# File 'lib/nba/award.rb', line 52 attribute :all_nba_team_number, Shale::Type::Integer |
#award_type ⇒ String
Returns the award type
92 |
# File 'lib/nba/award.rb', line 92 attribute :award_type, Shale::Type::String |
#conference ⇒ String
Returns the conference
84 |
# File 'lib/nba/award.rb', line 84 attribute :conference, Shale::Type::String |
#description ⇒ String
Returns the award description
44 |
# File 'lib/nba/award.rb', line 44 attribute :description, Shale::Type::String |
#first_name ⇒ String
Returns the player’s first name
20 |
# File 'lib/nba/award.rb', line 20 attribute :first_name, Shale::Type::String |
#last_name ⇒ String
Returns the player’s last name
28 |
# File 'lib/nba/award.rb', line 28 attribute :last_name, Shale::Type::String |
#month ⇒ Integer
Returns the month (for monthly awards)
68 |
# File 'lib/nba/award.rb', line 68 attribute :month, Shale::Type::Integer |
#player_id ⇒ Integer
Returns the player ID
12 |
# File 'lib/nba/award.rb', line 12 attribute :player_id, Shale::Type::Integer |
#season ⇒ String
Returns the season
60 |
# File 'lib/nba/award.rb', line 60 attribute :season, Shale::Type::String |
#subtype1 ⇒ String
Returns the award subtype 1
100 |
# File 'lib/nba/award.rb', line 100 attribute :subtype1, Shale::Type::String |
#subtype2 ⇒ String
Returns the award subtype 2
108 |
# File 'lib/nba/award.rb', line 108 attribute :subtype2, Shale::Type::String |
#subtype3 ⇒ String
Returns the award subtype 3
116 |
# File 'lib/nba/award.rb', line 116 attribute :subtype3, Shale::Type::String |
#team ⇒ String
Returns the team name
36 |
# File 'lib/nba/award.rb', line 36 attribute :team, Shale::Type::String |
#week ⇒ Integer
Returns the week (for weekly awards)
76 |
# File 'lib/nba/award.rb', line 76 attribute :week, Shale::Type::Integer |
Instance Method Details
#player ⇒ Player?
Returns the player object
124 125 126 |
# File 'lib/nba/award.rb', line 124 def player Players.find(player_id) end |