Sha256: aa5fa6368b33db912268b320a8f40ecdb7158f73dcc80ddac679ef05bd1d001d

Contents?: true

Size: 1006 Bytes

Versions: 128

Compression:

Stored size: 1006 Bytes

Contents

module Sportradar
  module Api
    class Football::StatPack::Kickoffs < Football::StatPack
      attr_accessor :kickoffs, :endzone, :inside_20, :return_yards, :touchbacks, :yards, :out_of_bounds, :average

      def set_stats
        @kickoffs      = response["kickoffs"] || response['kicks'] || response['number']
        @endzone       = response["endzone"]
        @inside_20     = response["inside_20"] || response['in20']
        @return_yards  = response["return_yards"] || response['ret_yds']
        @touchbacks    = response["touchbacks"] || response['tb']
        @yards         = response["yards"] || response['yds']
        @average       = response['avg'] || (@yards.to_f / @kickoffs.to_i)
        @out_of_bounds = response["out_of_bounds"] # unknown ncaafb
      end
    end

  end
end
# ncaafb = {"kicks"=>10, "yds"=>606, "net_yds"=>411, "lg"=>65, "endzone"=>3, "in20"=>3, "tb"=>2, "ret"=>7, "avg"=>60.6, "net_avg"=>41.1, "ret_yds"=>195, "avg_ret"=>27.857, "in20_pct"=>30.0, "tb_pct"=>20.0}

Version data entries

128 entries across 128 versions & 1 rubygems

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