Class: NBA::Team
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::Team
- Defined in:
- lib/nba/team.rb
Overview
Represents an NBA team
Team ID Constants collapse
- ATL =
Atlanta Hawks team ID
1_610_612_737- BOS =
Boston Celtics team ID
1_610_612_738- BKN =
Brooklyn Nets team ID
1_610_612_751- CHA =
Charlotte Hornets team ID
1_610_612_766- CHI =
Chicago Bulls team ID
1_610_612_741- CLE =
Cleveland Cavaliers team ID
1_610_612_739- DAL =
Dallas Mavericks team ID
1_610_612_742- DEN =
Denver Nuggets team ID
1_610_612_743- DET =
Detroit Pistons team ID
1_610_612_765- GSW =
Golden State Warriors team ID
1_610_612_744- HOU =
Houston Rockets team ID
1_610_612_745- IND =
Indiana Pacers team ID
1_610_612_754- LAC =
Los Angeles Clippers team ID
1_610_612_746- LAL =
Los Angeles Lakers team ID
1_610_612_747- MEM =
Memphis Grizzlies team ID
1_610_612_763- MIA =
Miami Heat team ID
1_610_612_748- MIL =
Milwaukee Bucks team ID
1_610_612_749- MIN =
Minnesota Timberwolves team ID
1_610_612_750- NOP =
New Orleans Pelicans team ID
1_610_612_740- NYK =
New York Knicks team ID
1_610_612_752- OKC =
Oklahoma City Thunder team ID
1_610_612_760- ORL =
Orlando Magic team ID
1_610_612_753- PHI =
Philadelphia 76ers team ID
1_610_612_755- PHX =
Phoenix Suns team ID
1_610_612_756- POR =
Portland Trail Blazers team ID
1_610_612_757- SAC =
Sacramento Kings team ID
1_610_612_758- SAS =
San Antonio Spurs team ID
1_610_612_759- TOR =
Toronto Raptors team ID
1_610_612_761- UTA =
Utah Jazz team ID
1_610_612_762- WAS =
Washington Wizards team ID
1_610_612_764
Instance Attribute Summary collapse
-
#abbreviation ⇒ String
Returns the team abbreviation.
-
#city ⇒ String
Returns the team’s city.
-
#conference ⇒ Conference
Returns the team’s conference.
-
#division ⇒ Division
Returns the team’s division.
-
#full_name ⇒ String
Returns the team’s full name.
-
#id ⇒ Integer
Returns the unique identifier for the team.
-
#name ⇒ String
Returns the team name.
-
#nickname ⇒ String
Returns the team nickname.
-
#state ⇒ String
Returns the team’s state.
-
#year_founded ⇒ Integer
Returns the year the team was founded.
Instance Method Summary collapse
-
#arena ⇒ String?
Returns the team’s home arena.
Instance Attribute Details
#abbreviation ⇒ String
Returns the team abbreviation
136 |
# File 'lib/nba/team.rb', line 136 attribute :abbreviation, Shale::Type::String |
#city ⇒ String
Returns the team’s city
152 |
# File 'lib/nba/team.rb', line 152 attribute :city, Shale::Type::String |
#conference ⇒ Conference
Returns the team’s conference
176 |
# File 'lib/nba/team.rb', line 176 attribute :conference, Conference |
#division ⇒ Division
Returns the team’s division
184 |
# File 'lib/nba/team.rb', line 184 attribute :division, Division |
#full_name ⇒ String
Returns the team’s full name
128 |
# File 'lib/nba/team.rb', line 128 attribute :full_name, Shale::Type::String |
#id ⇒ Integer
Returns the unique identifier for the team
112 |
# File 'lib/nba/team.rb', line 112 attribute :id, Shale::Type::Integer |
#name ⇒ String
Returns the team name
120 |
# File 'lib/nba/team.rb', line 120 attribute :name, Shale::Type::String |
#nickname ⇒ String
Returns the team nickname
144 |
# File 'lib/nba/team.rb', line 144 attribute :nickname, Shale::Type::String |
#state ⇒ String
Returns the team’s state
160 |
# File 'lib/nba/team.rb', line 160 attribute :state, Shale::Type::String |
#year_founded ⇒ Integer
Returns the year the team was founded
168 |
# File 'lib/nba/team.rb', line 168 attribute :year_founded, Shale::Type::Integer |
Instance Method Details
#arena ⇒ String?
Returns the team’s home arena
207 208 209 |
# File 'lib/nba/team.rb', line 207 def arena TeamDetails.find(team: id)&.arena end |