Class: Sportradar::Api::Football::PlayReturnStatistics
- Defined in:
- lib/sportradar/api/football/play_statistics.rb
Instance Attribute Summary collapse
-
#category ⇒ Object
Returns the value of attribute category.
-
#downed ⇒ Object
Returns the value of attribute downed.
-
#faircatch ⇒ Object
Returns the value of attribute faircatch.
-
#nullified ⇒ Object
Returns the value of attribute nullified.
-
#out_of_bounds ⇒ Object
Returns the value of attribute out_of_bounds.
-
#player ⇒ Object
Returns the value of attribute player.
-
#return ⇒ Object
Returns the value of attribute return.
-
#team ⇒ Object
Returns the value of attribute team.
-
#touchback ⇒ Object
Returns the value of attribute touchback.
-
#touchdown ⇒ Object
Returns the value of attribute touchdown.
-
#yards ⇒ Object
Returns the value of attribute yards.
Instance Method Summary collapse
-
#initialize(data) ⇒ PlayReturnStatistics
constructor
A new instance of PlayReturnStatistics.
- #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) ⇒ PlayReturnStatistics
Returns a new instance of PlayReturnStatistics.
375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 375 def initialize(data) @response = data @category = data['category'] @downed = data['downed'] @faircatch = data['faircatch'] || data['fc'] @out_of_bounds = data['out_of_bounds'] @return = data['return'] || data['returns'] @touchback = data['touchback'] || data['tb'] @touchdown = data['touchdown'] || data['td'] @yards = data['yards'] || data['yds'] @team = OpenStruct.new(data['team']) if data['team'] @player = OpenStruct.new(data['player']) if data['player'] @nullified = data['nullified'] end |
Instance Attribute Details
#category ⇒ Object
Returns the value of attribute category.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def category @category end |
#downed ⇒ Object
Returns the value of attribute downed.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def downed @downed end |
#faircatch ⇒ Object
Returns the value of attribute faircatch.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def faircatch @faircatch end |
#nullified ⇒ Object
Returns the value of attribute nullified.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def nullified @nullified end |
#out_of_bounds ⇒ Object
Returns the value of attribute out_of_bounds.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def out_of_bounds @out_of_bounds end |
#player ⇒ Object
Returns the value of attribute player.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def player @player end |
#return ⇒ Object
Returns the value of attribute return.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def return @return end |
#team ⇒ Object
Returns the value of attribute team.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def team @team end |
#touchback ⇒ Object
Returns the value of attribute touchback.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def touchback @touchback end |
#touchdown ⇒ Object
Returns the value of attribute touchdown.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def touchdown @touchdown end |
#yards ⇒ Object
Returns the value of attribute yards.
374 375 376 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 374 def yards @yards end |
Instance Method Details
#nullified? ⇒ Boolean
390 391 392 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 390 def nullified? @nullified.to_s == 'true' end |