class AFL::Season
Public Class Methods
new(year, team_name = nil)
click to toggle source
# File lib/afl/season.rb, line 4 def initialize(year, team_name = nil) @year, @team_name = year, team_name @team_name ? @matches = team_matches : @matches = season_matches end
Public Instance Methods
next_match(time = Time.now)
click to toggle source
# File lib/afl/season.rb, line 9 def next_match(time = Time.now) @matches.each do |match| if match.time > time break match end end end
Private Instance Methods
season_matches()
click to toggle source
# File lib/afl/season.rb, line 23 def season_matches #@TODO end
team_matches()
click to toggle source
# File lib/afl/season.rb, line 19 def team_matches FixtureImporter.new(@year, @team_name).import end