Class: Sportradar::Api::Football::StatPack::Rushing
- Inherits:
-
Sportradar::Api::Football::StatPack
- Object
- Data
- Sportradar::Api::Football::StatPack
- Sportradar::Api::Football::StatPack::Rushing
- Defined in:
- lib/sportradar/api/football/stat_pack/rushing.rb
Instance Attribute Summary collapse
-
#attempts ⇒ Object
Returns the value of attribute attempts.
-
#avg_yards ⇒ Object
Returns the value of attribute avg_yards.
-
#longest ⇒ Object
Returns the value of attribute longest.
-
#longest_touchdown ⇒ Object
Returns the value of attribute longest_touchdown.
-
#redzone_attempts ⇒ Object
Returns the value of attribute redzone_attempts.
-
#tlost ⇒ Object
Returns the value of attribute tlost.
-
#tlost_yards ⇒ Object
Returns the value of attribute tlost_yards.
-
#touchdowns ⇒ Object
Returns the value of attribute touchdowns.
-
#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/rushing.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/rushing.rb', line 4 def avg_yards @avg_yards end |
#longest ⇒ Object
Returns the value of attribute longest.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/rushing.rb', line 4 def longest @longest end |
#longest_touchdown ⇒ Object
Returns the value of attribute longest_touchdown.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/rushing.rb', line 4 def longest_touchdown @longest_touchdown end |
#redzone_attempts ⇒ Object
Returns the value of attribute redzone_attempts.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/rushing.rb', line 4 def redzone_attempts @redzone_attempts end |
#tlost ⇒ Object
Returns the value of attribute tlost.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/rushing.rb', line 4 def tlost @tlost end |
#tlost_yards ⇒ Object
Returns the value of attribute tlost_yards.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/rushing.rb', line 4 def tlost_yards @tlost_yards end |
#touchdowns ⇒ Object
Returns the value of attribute touchdowns.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/rushing.rb', line 4 def touchdowns @touchdowns end |
#yards ⇒ Object
Returns the value of attribute yards.
4 5 6 |
# File 'lib/sportradar/api/football/stat_pack/rushing.rb', line 4 def yards @yards end |
Instance Method Details
#set_stats ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/sportradar/api/football/stat_pack/rushing.rb', line 6 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 |