Class: NBA::TeamYear
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::TeamYear
- Defined in:
- lib/nba/team_year.rb
Overview
Represents a year/season a team participated in the league
Instance Attribute Summary collapse
-
#abbreviation ⇒ String
Returns the team abbreviation for that year.
-
#team_id ⇒ Integer
Returns the team ID.
-
#year ⇒ Integer
Returns the year.
Instance Method Summary collapse
-
#season ⇒ String?
Returns the season string.
-
#team ⇒ Team?
Returns the team object.
Instance Attribute Details
#abbreviation ⇒ String
Returns the team abbreviation for that year
31 |
# File 'lib/nba/team_year.rb', line 31 attribute :abbreviation, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
15 |
# File 'lib/nba/team_year.rb', line 15 attribute :team_id, Shale::Type::Integer |
#year ⇒ Integer
Returns the year
23 |
# File 'lib/nba/team_year.rb', line 23 attribute :year, Shale::Type::Integer |
Instance Method Details
#season ⇒ String?
Returns the season string
49 50 51 52 53 |
# File 'lib/nba/team_year.rb', line 49 def season return unless year Utils.format_season(year) end |
#team ⇒ Team?
Returns the team object
39 40 41 |
# File 'lib/nba/team_year.rb', line 39 def team Teams.find(team_id) end |