Class: NBA::Franchise
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::Franchise
- Defined in:
- lib/nba/franchise.rb
Overview
Represents franchise history data
Instance Attribute Summary collapse
-
#conf_titles ⇒ Integer
Returns the number of conference titles.
-
#div_titles ⇒ Integer
Returns the number of division titles.
-
#end_year ⇒ Integer
Returns the franchise end year.
-
#games ⇒ Integer
Returns the total games played.
-
#league_id ⇒ String
Returns the league ID.
-
#league_titles ⇒ Integer
Returns the number of league/NBA championships.
-
#losses ⇒ Integer
Returns the total losses.
-
#po_appearances ⇒ Integer
Returns the number of playoff appearances.
-
#start_year ⇒ Integer
Returns the franchise start year.
-
#team_city ⇒ String
Returns the team city.
-
#team_id ⇒ Integer
Returns the team ID.
-
#team_name ⇒ String
Returns the team name.
-
#win_pct ⇒ Float
Returns the all-time win percentage.
-
#wins ⇒ Integer
Returns the total wins.
-
#years ⇒ Integer
Returns the number of years the franchise has existed.
Instance Method Summary collapse
-
#team ⇒ Team?
Returns the team object for this franchise.
Instance Attribute Details
#conf_titles ⇒ Integer
Returns the number of conference titles
116 |
# File 'lib/nba/franchise.rb', line 116 attribute :conf_titles, Shale::Type::Integer |
#div_titles ⇒ Integer
Returns the number of division titles
108 |
# File 'lib/nba/franchise.rb', line 108 attribute :div_titles, Shale::Type::Integer |
#end_year ⇒ Integer
Returns the franchise end year
52 |
# File 'lib/nba/franchise.rb', line 52 attribute :end_year, Shale::Type::Integer |
#games ⇒ Integer
Returns the total games played
68 |
# File 'lib/nba/franchise.rb', line 68 attribute :games, Shale::Type::Integer |
#league_id ⇒ String
Returns the league ID
12 |
# File 'lib/nba/franchise.rb', line 12 attribute :league_id, Shale::Type::String |
#league_titles ⇒ Integer
Returns the number of league/NBA championships
124 |
# File 'lib/nba/franchise.rb', line 124 attribute :league_titles, Shale::Type::Integer |
#losses ⇒ Integer
Returns the total losses
84 |
# File 'lib/nba/franchise.rb', line 84 attribute :losses, Shale::Type::Integer |
#po_appearances ⇒ Integer
Returns the number of playoff appearances
100 |
# File 'lib/nba/franchise.rb', line 100 attribute :po_appearances, Shale::Type::Integer |
#start_year ⇒ Integer
Returns the franchise start year
44 |
# File 'lib/nba/franchise.rb', line 44 attribute :start_year, Shale::Type::Integer |
#team_city ⇒ String
Returns the team city
28 |
# File 'lib/nba/franchise.rb', line 28 attribute :team_city, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
20 |
# File 'lib/nba/franchise.rb', line 20 attribute :team_id, Shale::Type::Integer |
#team_name ⇒ String
Returns the team name
36 |
# File 'lib/nba/franchise.rb', line 36 attribute :team_name, Shale::Type::String |
#win_pct ⇒ Float
Returns the all-time win percentage
92 |
# File 'lib/nba/franchise.rb', line 92 attribute :win_pct, Shale::Type::Float |
#wins ⇒ Integer
Returns the total wins
76 |
# File 'lib/nba/franchise.rb', line 76 attribute :wins, Shale::Type::Integer |
#years ⇒ Integer
Returns the number of years the franchise has existed
60 |
# File 'lib/nba/franchise.rb', line 60 attribute :years, Shale::Type::Integer |
Instance Method Details
#team ⇒ Team?
Returns the team object for this franchise
132 133 134 |
# File 'lib/nba/franchise.rb', line 132 def team Teams.find(team_id) end |