Sha256: 2bdf291ff59bc0deb0fa46f7232e95b843e9d63e02286d7084e84ee285ebe00d

Contents?: true

Size: 1.09 KB

Versions: 128

Compression:

Stored size: 1.09 KB

Contents

module Sportradar
  module Api
    class Football::StatPack::Rushing < Football::StatPack
      attr_accessor :avg_yards, :yards, :touchdowns, :longest, :longest_touchdown, :attempts, :tlost, :tlost_yards, :redzone_attempts

      def set_stats
        @avg_yards         = response["avg_yards"] || response['avg']
        @yards             = response["yards"] || response['yds']
        @touchdowns        = response["touchdowns"] || response['td']
        @longest           = response["longest"] || response['lg']
        @longest_touchdown = response["longest_touchdown"] # unknown ncaafb
        @attempts          = response["attempts"] || response['att']
        @tlost             = response["tlost"] # unknown ncaafb
        @tlost_yards       = response["tlost_yards"] # unknown ncaafb
        @redzone_attempts  = response["redzone_attempts"] || response['rz_att']
      end
    end

  end
end

# ncaafb = {"att"=>35, "yds"=>189, "avg"=>5.4, "lg"=>40, "td"=>2, "fd"=>11, "fd_pct"=>31.429, "sfty"=>0, "rz_att"=>8, "fum"=>0, "yds_10_pls"=>1, "yds_20_pls"=>1, "yds_30_pls"=>1, "yds_40_pls"=>1, "yds_50_pls"=>0}

Version data entries

128 entries across 128 versions & 1 rubygems

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