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.15 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.14 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.13 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.12 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.11 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.10 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.9 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.8 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.7 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.6 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.5 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.4 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.3 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.2 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.1 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.10.0 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.9.59 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.9.58 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.9.57 lib/sportradar/api/ncaafb/week.rb
sportradar-api-0.9.56 lib/sportradar/api/ncaafb/week.rb