Sha256: 9724ac8e0dee7ecd58d7f2f5855bec993c40774b4fb0771e3992aa4869df7415
Contents?: true
Size: 412 Bytes
Versions: 2
Compression:
Stored size: 412 Bytes
Contents
module SportsDataApi module Nfl class Season attr_reader :year, :type def initialize(json) @json = json @id = json['id'] @year = json['year'] @type = json['type'].to_sym end def weeks @weeks ||= json['weeks'].map do |week| Week.new(week, year, type) end end private attr_reader :json end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sports_data_api-0.15.1 | lib/sports_data_api/nfl/season.rb |
sports_data_api-0.15.0 | lib/sports_data_api/nfl/season.rb |