class KnicksHistory::Season
Attributes
best_player_ws[RW]
def_rating[RW]
losses[RW]
off_rating[RW]
pace[RW]
playoff_results[RW]
win_percentage[RW]
wins[RW]
year[RW]
Public Class Methods
all()
click to toggle source
# File lib/knicks_history/season.rb, line 22 def self.all @@all end
find_season(year)
click to toggle source
# File lib/knicks_history/season.rb, line 26 def self.find_season(year) @@all.detect do |season| season[0] == year.to_s end end
new(season_hash = nil)
click to toggle source
# File lib/knicks_history/season.rb, line 7 def initialize(season_hash = nil) if season_hash != nil @year = season_hash[:year] @wins = season_hash[:wins] @losses = season_hash[:losses] @win_percentage = season_hash[:win_percentage] @off_rating = season_hash[:off_rating] @def_rating = season_hash[:def_rating] @best_player_ws = season_hash[:best_player_ws] @pace = season_hash[:pace] @playoff_results = season_hash[:playoff_results] @@all[@year] = self end end