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.55 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.54 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.53 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.52 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.51 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.50 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.49 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.48 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.47 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.46 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.45 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.44 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.43 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.42 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.41 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.40 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.39 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.38 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.37 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.36 lib/sportradar/api/ncaafb/week.rb