Class: Sportradar::Api::Football::PlayKickStatistics
- Defined in:
- lib/sportradar/api/football/play_statistics.rb
Instance Attribute Summary collapse
-
#attempt ⇒ Object
Returns the value of attribute attempt.
-
#endzone ⇒ Object
Returns the value of attribute endzone.
-
#gross_yards ⇒ Object
Returns the value of attribute gross_yards.
-
#inside_20 ⇒ Object
Returns the value of attribute inside_20.
-
#nullified ⇒ Object
Returns the value of attribute nullified.
-
#player ⇒ Object
Returns the value of attribute player.
-
#team ⇒ Object
Returns the value of attribute team.
-
#touchback ⇒ Object
Returns the value of attribute touchback.
-
#yards ⇒ Object
Returns the value of attribute yards.
Instance Method Summary collapse
-
#initialize(data) ⇒ PlayKickStatistics
constructor
A new instance of PlayKickStatistics.
- #nullified? ⇒ Boolean
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
#initialize(data) ⇒ PlayKickStatistics
Returns a new instance of PlayKickStatistics.
341 342 343 344 345 346 347 348 349 350 351 352 353 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 341 def initialize(data) @response = data @endzone = data['endzone'] @inside_20 = data['inside_20'] || data['in20'] @attempt = data['attempt'] || data['kicks'] @returned = data['ret'] @yards = data['yards'] || data['yds'] @gross_yards = data['gross_yards'] || data['net_yds'] @touchback = data['touchback'] || data['tb'] @team = OpenStruct.new(data['team']) if data['team'] @player = OpenStruct.new(data['player']) if data['player'] @nullified = data['nullified'] end |
Instance Attribute Details
#attempt ⇒ Object
Returns the value of attribute attempt.
340 341 342 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 340 def attempt @attempt end |
#endzone ⇒ Object
Returns the value of attribute endzone.
340 341 342 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 340 def endzone @endzone end |
#gross_yards ⇒ Object
Returns the value of attribute gross_yards.
340 341 342 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 340 def gross_yards @gross_yards end |
#inside_20 ⇒ Object
Returns the value of attribute inside_20.
340 341 342 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 340 def inside_20 @inside_20 end |
#nullified ⇒ Object
Returns the value of attribute nullified.
340 341 342 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 340 def nullified @nullified end |
#player ⇒ Object
Returns the value of attribute player.
340 341 342 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 340 def player @player end |
#team ⇒ Object
Returns the value of attribute team.
340 341 342 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 340 def team @team end |
#touchback ⇒ Object
Returns the value of attribute touchback.
340 341 342 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 340 def touchback @touchback end |
#yards ⇒ Object
Returns the value of attribute yards.
340 341 342 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 340 def yards @yards end |
Instance Method Details
#nullified? ⇒ Boolean
355 356 357 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 355 def nullified? @nullified.to_s == 'true' end |