Class: Sportradar::Api::Football::StatPack::Defense

Inherits:
Sportradar::Api::Football::StatPack show all
Defined in:
lib/sportradar/api/football/stat_pack/defense.rb

Instance Attribute Summary collapse

Attributes inherited from Sportradar::Api::Football::StatPack

#id, #name, #player, #players, #position, #response, #yards

Instance Method Summary collapse

Methods inherited from Sportradar::Api::Football::StatPack

#initialize

Methods inherited from Data

#all_attributes, #attributes, #create_data, #parse_into_array, #parse_into_array_with_options, #parse_out_hashes, #structure_links, #update_data

Constructor Details

This class inherits a constructor from Sportradar::Api::Football::StatPack

Instance Attribute Details

#assistsObject

Returns the value of attribute assists.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def assists
  @assists
end

#combinedObject

Returns the value of attribute combined.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def combined
  @combined
end

#forced_fumblesObject

Returns the value of attribute forced_fumbles.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def forced_fumbles
  @forced_fumbles
end

#fumble_recoveriesObject

Returns the value of attribute fumble_recoveries.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def fumble_recoveries
  @fumble_recoveries
end

#interceptionsObject

Returns the value of attribute interceptions.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def interceptions
  @interceptions
end

#misc_assistsObject

Returns the value of attribute misc_assists.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def misc_assists
  @misc_assists
end

#misc_forced_fumblesObject

Returns the value of attribute misc_forced_fumbles.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def misc_forced_fumbles
  @misc_forced_fumbles
end

#misc_fumble_recoveriesObject

Returns the value of attribute misc_fumble_recoveries.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def misc_fumble_recoveries
  @misc_fumble_recoveries
end

#misc_tacklesObject

Returns the value of attribute misc_tackles.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def misc_tackles
  @misc_tackles
end

#missed_tacklesObject

Returns the value of attribute missed_tackles.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def missed_tackles
  @missed_tackles
end

#passes_defendedObject

Returns the value of attribute passes_defended.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def passes_defended
  @passes_defended
end

#qb_hitsObject

Returns the value of attribute qb_hits.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def qb_hits
  @qb_hits
end

#sack_yardsObject

Returns the value of attribute sack_yards.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def sack_yards
  @sack_yards
end

#sacksObject

Returns the value of attribute sacks.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def sacks
  @sacks
end

#safetiesObject

Returns the value of attribute safeties.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def safeties
  @safeties
end

#sp_assistsObject

Returns the value of attribute sp_assists.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def sp_assists
  @sp_assists
end

#sp_blocksObject

Returns the value of attribute sp_blocks.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def sp_blocks
  @sp_blocks
end

#sp_forced_fumblesObject

Returns the value of attribute sp_forced_fumbles.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def sp_forced_fumbles
  @sp_forced_fumbles
end

#sp_fumble_recoveriesObject

Returns the value of attribute sp_fumble_recoveries.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def sp_fumble_recoveries
  @sp_fumble_recoveries
end

#sp_tacklesObject

Returns the value of attribute sp_tackles.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def sp_tackles
  @sp_tackles
end

#tacklesObject

Returns the value of attribute tackles.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def tackles
  @tackles
end

#tlossObject

Returns the value of attribute tloss.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def tloss
  @tloss
end

#tloss_yardsObject

Returns the value of attribute tloss_yards.



4
5
6
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 4

def tloss_yards
  @tloss_yards
end

Instance Method Details

#set_statsObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/sportradar/api/football/stat_pack/defense.rb', line 6

def set_stats
  @tackles                = response["tackles"] || response["tackle"]
  @assists                = response["assists"] || response['ast']
  @combined               = response["combined"] || response['comb']
  @sacks                  = response["sacks"] || response['sack']
  @sack_yards             = response["sack_yards"] || response['sack_yds']
  @interceptions          = response["interceptions"] || response['int']
  @passes_defended        = response["passes_defended"] || response['pd']
  @forced_fumbles         = response["forced_fumbles"] || response['force_fum']
  @fumble_recoveries      = response["fumble_recoveries"] || response['fum_rec']
  @qb_hits                = response["qb_hits"] || response['qh']
  @tloss                  = response["tloss"] || response['tlost']
  @tloss_yards            = response["tloss_yards"]
  @safeties               = response["safeties"] || response['sfty']
  @sp_tackles             = response["sp_tackles"] || response['sp_tackle']
  @sp_assists             = response["sp_assists"] || response['sp_ast']
  @sp_forced_fumbles      = response["sp_forced_fumbles"] || response['sp_force_fum']
  @sp_fumble_recoveries   = response["sp_fumble_recoveries"] || response['sp_fum_rec']
  @sp_blocks              = response["sp_blocks"]
  @misc_tackles           = response["misc_tackles"] || response['misc_tackle']
  @misc_assists           = response["misc_assists"] || response['misc_ast']
  @misc_forced_fumbles    = response["misc_forced_fumbles"] || response['misc_force_fum']
  @misc_fumble_recoveries = response["misc_fumble_recoveries"] || response['misc_fum_rec']
  @missed_tackles         = response["missed_tackles"]
end