class NflData::Api::Schedule
Attributes
feed[R]
parser[R]
Public Class Methods
new(parser: Parsers::ScheduleParser.new, feed: MySportsFeeds::SeasonalGamesFeed.new)
click to toggle source
# File lib/nfl_data/api/schedule.rb, line 8 def initialize(parser: Parsers::ScheduleParser.new, feed: MySportsFeeds::SeasonalGamesFeed.new) @parser = parser @feed = feed end
Public Instance Methods
season(year:)
click to toggle source
# File lib/nfl_data/api/schedule.rb, line 13 def season(year:) schedule_data = feed.feed(season_start_year: year) parser.parse(schedule_data: schedule_data).to_h.to_json end