Sha256: 8d3209ee9a725516b7cbc4c44fe57b794faed0d179e8b123d2a839dc5aa7f3eb

Contents?: true

Size: 1.13 KB

Versions: 128

Compression:

Stored size: 1.13 KB

Contents

module Sportradar
  module Api
    class Football::StatPack::Punts < Football::StatPack
      attr_accessor :avg_yards, :yards, :attempts, :blocked, :longest, :touchbacks, :inside_20, :avg_net_yards, :return_yards, :net_yards

      def set_stats
        @avg_yards     = response["avg_yards"] || response['avg']
        @yards         = response["yards"] || response['yds']
        @attempts      = response["attempts"] || response['punts']
        @blocked       = response["blocked"] || response['blk']
        @longest       = response["longest"] || response['lg']
        @touchbacks    = response["touchbacks"] || response['tb']
        @inside_20     = response["inside_20"] || response['in20']
        @avg_net_yards = response["avg_net_yards"] || response['net_avg']
        @return_yards  = response["return_yards"] || response['return_yards']
        @net_yards     = response["net_yards"] # unknown ncaafb
      end
    end

  end
end

# ncaafb = {"punts"=>3, "yds"=>94, "net_yds"=>94, "lg"=>39, "blk"=>0, "in20"=>2, "tb"=>0, "ret"=>0, "sfty"=>0, "avg"=>31.333, "net_avg"=>31.333, "ret_yds"=>0, "avg_ret"=>0.0, "in20_pct"=>66.667, "tb_pct"=>0.0}

Version data entries

128 entries across 128 versions & 1 rubygems

Version Path
sportradar-api-0.20.2 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.20.1 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.20.0 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.20.0.pre2 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.20.0.pre lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.19.6 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.19.5 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.19.4 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.19.3 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.19.2 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.19.1 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.19.0 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.18.1 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.18.0 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.17.6 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.17.5 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.17.5.pre lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.17.4 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.17.3 lib/sportradar/api/football/stat_pack/punts.rb
sportradar-api-0.17.2 lib/sportradar/api/football/stat_pack/punts.rb