Sha256: 04c616c4e81c82655194b9366c265e23480e0dfda322a92b08ba07ee266e361c

Contents?: true

Size: 756 Bytes

Versions: 88

Compression:

Stored size: 756 Bytes

Contents

module Sportradar
  module Api
    class Ncaafb
      class Week < Data
        attr_accessor :response, :id, :sequence, :title, :season

        def initialize(data, **opts)
          @response = data
          @api      = opts[:api]
          @season   = opts[:season]
          # @id       = response['id']
          # @year     = response['year']
          # @type     = response['type']
          @sequence = response['week']

        rescue => e
          binding.pry
        end

        def number
          sequence
        end

        # private

        def games
          @games ||= parse_into_array_with_options(selector: response["game"], klass: Sportradar::Api::Ncaafb::Game, api: @api, week: self)
        end

      end
    end
  end
end

Version data entries

88 entries across 88 versions & 1 rubygems

Version Path
sportradar-api-0.10.35 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.34 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.33 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.32 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.31 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.30 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.29 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.28 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.27 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.26 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.25 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.24 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.23 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.22 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.21 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.20 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.19 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.18 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.17 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.16 lib/sportradar/api/ncaafb/week.rb