Sha256: 7f6b6811e918574fd923f1017c2d6c655365c0fb1f36ba494344824e6f9e5be4

Contents?: true

Size: 649 Bytes

Versions: 2

Compression:

Stored size: 649 Bytes

Contents

module Sportradar
  module Api
    class Nfl::LeagueDepthChart < Data
      attr_accessor :response, :season, :charts

      def initialize(data)
        @response = data
        depth_chart_data = data["season"].delete('depth_charts')
        @season = Sportradar::Api::Nfl::Season.new data["season"] if data["season"]
        # @teams = depth_chart_data["team"].map {|team| Sportradar::Api::Nfl::Team.new team } if depth_chart_data["team"]
        @charts = depth_chart_data["team"].map {|team| Sportradar::Api::Nfl::TeamDepthChart.new(team, season) } if depth_chart_data["team"]
      rescue => e
        binding.pry
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sportradar-api-0.1.34 lib/sportradar/api/nfl/league_depth_chart.rb
sportradar-api-0.1.33 lib/sportradar/api/nfl/league_depth_chart.rb