Class: Sportradar::Api::Football::StatPack::FieldGoals
- Inherits:
-
Sportradar::Api::Football::StatPack
- Object
- Data
- Sportradar::Api::Football::StatPack
- Sportradar::Api::Football::StatPack::FieldGoals
- Defined in:
- lib/sportradar/api/football/stat_pack/field_goals.rb
Instance Attribute Summary collapse
-
#attempts ⇒ Object
Returns the value of attribute attempts.
-
#avg_yards ⇒ Object
Returns the value of attribute avg_yards.
-
#blocked ⇒ Object
Returns the value of attribute blocked.
-
#longest ⇒ Object
Returns the value of attribute longest.
-
#made ⇒ Object
Returns the value of attribute made.
-
#pct ⇒ Object
Returns the value of attribute pct.
-
#yards ⇒ Object
Returns the value of attribute yards.
Attributes inherited from Sportradar::Api::Football::StatPack
#id, #name, #player, #players, #position, #response
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/field_goals.rb', line 4 def attempts @attempts end |
#avg_yards ⇒ Object
Returns the value of attribute avg_yards.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/field_goals.rb', line 4 def avg_yards @avg_yards end |
#blocked ⇒ Object
Returns the value of attribute blocked.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/field_goals.rb', line 4 def blocked @blocked end |
#longest ⇒ Object
Returns the value of attribute longest.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/field_goals.rb', line 4 def longest @longest end |
#made ⇒ Object
Returns the value of attribute made.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/field_goals.rb', line 4 def made @made end |
#pct ⇒ Object
Returns the value of attribute pct.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/field_goals.rb', line 4 def pct @pct end |
#yards ⇒ Object
Returns the value of attribute yards.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/field_goals.rb', line 4 def yards @yards end |
Instance Method Details
#set_stats ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/sportradar/api/football/stat_pack/field_goals.rb', line 6 def set_stats @attempts = response["attempts"] || response["att"] @made = response["made"] @blocked = response["blocked"] || response['blk'] @yards = response["yards"] || response['yds'] @avg_yards = response["avg_yards"] @longest = response["longest"] || response['lg'] @pct = response["pct"] || (@made.to_f / @attempts.to_i) end |