Class: Sportradar::Api::Football::PlayReceiveStatistics
- Defined in:
- lib/sportradar/api/football/play_statistics.rb
Instance Attribute Summary collapse
-
#firstdown ⇒ Object
Returns the value of attribute firstdown.
-
#goaltogo ⇒ Object
Returns the value of attribute goaltogo.
-
#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.
-
#reception ⇒ Object
Returns the value of attribute reception.
-
#target ⇒ Object
Returns the value of attribute target.
-
#team ⇒ Object
Returns the value of attribute team.
-
#touchdown ⇒ Object
Returns the value of attribute touchdown.
-
#yards ⇒ Object
Returns the value of attribute yards.
-
#yards_after_catch ⇒ Object
Returns the value of attribute yards_after_catch.
Instance Method Summary collapse
-
#initialize(data) ⇒ PlayReceiveStatistics
constructor
A new instance of PlayReceiveStatistics.
- #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) ⇒ PlayReceiveStatistics
Returns a new instance of PlayReceiveStatistics.
273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 273 def initialize(data) @response = data @firstdown = data['firstdown'] || data['fd'] @goaltogo = data['goaltogo'] @inside_20 = data['inside_20'] || data['rz_tar'] @reception = data['reception'] || data['rec'] @target = data['target'] || data['tar'] @touchdown = data['touchdown'] || data['td'] @yards = data['yards'] || data['yds'] @yards_after_catch = data['yards_after_catch'] || data['yac'] @team = OpenStruct.new(data['team']) if data['team'] @player = OpenStruct.new(data['player']) if data['player'] @nullified = data['nullified'] end |
Instance Attribute Details
#firstdown ⇒ Object
Returns the value of attribute firstdown.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def firstdown @firstdown end |
#goaltogo ⇒ Object
Returns the value of attribute goaltogo.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def goaltogo @goaltogo end |
#inside_20 ⇒ Object
Returns the value of attribute inside_20.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def inside_20 @inside_20 end |
#nullified ⇒ Object
Returns the value of attribute nullified.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def nullified @nullified end |
#player ⇒ Object
Returns the value of attribute player.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def player @player end |
#reception ⇒ Object
Returns the value of attribute reception.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def reception @reception end |
#target ⇒ Object
Returns the value of attribute target.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def target @target end |
#team ⇒ Object
Returns the value of attribute team.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def team @team end |
#touchdown ⇒ Object
Returns the value of attribute touchdown.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def touchdown @touchdown end |
#yards ⇒ Object
Returns the value of attribute yards.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def yards @yards end |
#yards_after_catch ⇒ Object
Returns the value of attribute yards_after_catch.
272 273 274 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 272 def yards_after_catch @yards_after_catch end |
Instance Method Details
#nullified? ⇒ Boolean
288 289 290 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 288 def nullified? @nullified.to_s == 'true' end |