Class: Sportradar::Api::Football::StatPack::ExtraPoints
- Inherits:
-
Sportradar::Api::Football::StatPack
- Object
- Data
- Sportradar::Api::Football::StatPack
- Sportradar::Api::Football::StatPack::ExtraPoints
- Defined in:
- lib/sportradar/api/football/stat_pack/extra_points.rb
Instance Attribute Summary collapse
-
#attempts ⇒ Object
Returns the value of attribute attempts.
-
#blocked ⇒ Object
Returns the value of attribute blocked.
-
#defense_attempts ⇒ Object
Returns the value of attribute defense_attempts.
-
#defense_successes ⇒ Object
Returns the value of attribute defense_successes.
-
#made ⇒ Object
Returns the value of attribute made.
-
#pass_attempts ⇒ Object
Returns the value of attribute pass_attempts.
-
#pass_successes ⇒ Object
Returns the value of attribute pass_successes.
-
#pct ⇒ Object
Returns the value of attribute pct.
-
#rush_attempts ⇒ Object
Returns the value of attribute rush_attempts.
-
#rush_successes ⇒ Object
Returns the value of attribute rush_successes.
-
#turnover_successes ⇒ Object
Returns the value of attribute turnover_successes.
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
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
#attempts ⇒ Object
Returns the value of attribute attempts.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def attempts @attempts end |
#blocked ⇒ Object
Returns the value of attribute blocked.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def blocked @blocked end |
#defense_attempts ⇒ Object
Returns the value of attribute defense_attempts.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def defense_attempts @defense_attempts end |
#defense_successes ⇒ Object
Returns the value of attribute defense_successes.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def defense_successes @defense_successes end |
#made ⇒ Object
Returns the value of attribute made.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def made @made end |
#pass_attempts ⇒ Object
Returns the value of attribute pass_attempts.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def pass_attempts @pass_attempts end |
#pass_successes ⇒ Object
Returns the value of attribute pass_successes.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def pass_successes @pass_successes end |
#pct ⇒ Object
Returns the value of attribute pct.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def pct @pct end |
#rush_attempts ⇒ Object
Returns the value of attribute rush_attempts.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def rush_attempts @rush_attempts end |
#rush_successes ⇒ Object
Returns the value of attribute rush_successes.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def rush_successes @rush_successes end |
#turnover_successes ⇒ Object
Returns the value of attribute turnover_successes.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 4 def turnover_successes @turnover_successes end |
Instance Method Details
#set_stats ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/sportradar/api/football/stat_pack/extra_points.rb', line 6 def set_stats kick_data = response['kicks'] || response['totals'] || response @attempts = kick_data["attempts"] || kick_data["att"] @made = kick_data["made"] @blocked = kick_data["blocked"] || kick_data["blk"] @pct = kick_data["pct"] || (@made.to_f / @attempts.to_i) if response['conversions'] @pass_attempts = response["pass_attempts"] @pass_successes = response["pass_successes"] @rush_attempts = response["rush_attempts"] @rush_successes = response["rush_successes"] @defense_attempts = response["defense_attempts"] @defense_successes = response["defense_successes"] @turnover_successes = response["turnover_successes"] end end |