class Standings::LeagueResults
Attributes
league[RW]
teams[RW]
Public Class Methods
new(league)
click to toggle source
# File lib/standings/league_results.rb, line 7 def initialize(league) @league = league end
Public Instance Methods
bottom?(team)
click to toggle source
# File lib/standings/league_results.rb, line 20 def bottom?(team) team.position >= (teams.count - LeagueReference[league][:bottom_teams] + 1) end
middle?(team)
click to toggle source
# File lib/standings/league_results.rb, line 15 def middle?(team) LeagueReference[league][:middle_teams] && team.position <= LeagueReference[league][:middle_teams] end
top?(team)
click to toggle source
# File lib/standings/league_results.rb, line 11 def top?(team) team.position <= LeagueReference[league][:top_teams] end