Class: Sportradar::Api::Football::StatPack::KickReturns

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

Instance Attribute Summary collapse

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

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

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

#avg_yardsObject

Returns the value of attribute avg_yards.



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

def avg_yards
  @avg_yards
end

#faircatchesObject

Returns the value of attribute faircatches.



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

def faircatches
  @faircatches
end

#longestObject

Returns the value of attribute longest.



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

def longest
  @longest
end

#longest_touchdownObject

Returns the value of attribute longest_touchdown.



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

def longest_touchdown
  @longest_touchdown
end

#returnsObject

Returns the value of attribute returns.



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

def returns
  @returns
end

#touchdownsObject

Returns the value of attribute touchdowns.



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

def touchdowns
  @touchdowns
end

#yardsObject

Returns the value of attribute yards.



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

def yards
  @yards
end

Instance Method Details

#set_statsObject



6
7
8
9
10
11
12
13
14
# File 'lib/sportradar/api/football/stat_pack/kick_returns.rb', line 6

def set_stats
  @returns           = response["returns"] || response['number']
  @yards             = response["yards"] || response['yds']
  @avg_yards         = response["avg_yards"] || response['avg']
  @touchdowns        = response["touchdowns"] || response['td']
  @longest           = response["longest"] || response['lg']
  @faircatches       = response["faircatches"] || response['fc']
  @longest_touchdown = response["longest_touchdown"] # unknown ncaafb
end