Class: Sportradar::Api::Football::PlayFumbleStatistics
- Defined in:
- lib/sportradar/api/football/play_statistics.rb
Instance Attribute Summary collapse
-
#forced ⇒ Object
readonly
Returns the value of attribute forced.
-
#own_rec ⇒ Object
readonly
Returns the value of attribute own_rec.
-
#own_rec_yards ⇒ Object
readonly
Returns the value of attribute own_rec_yards.
-
#player ⇒ Object
readonly
Returns the value of attribute player.
-
#team ⇒ Object
readonly
Returns the value of attribute team.
Instance Method Summary collapse
-
#initialize(data) ⇒ PlayFumbleStatistics
constructor
A new instance of PlayFumbleStatistics.
- #lost? ⇒ 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) ⇒ PlayFumbleStatistics
Returns a new instance of PlayFumbleStatistics.
295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 295 def initialize(data) @response = data @oob = data['oob'] @lost = data['lost'] @own_rec = data['own_rec'] @own_rec_yards = data['own_rec_yards'] @forced = data['forced'] @team = OpenStruct.new(data['team']) if data['team'] @player = OpenStruct.new(data['player']) if data['player'] end |
Instance Attribute Details
#forced ⇒ Object (readonly)
Returns the value of attribute forced.
294 295 296 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 294 def forced @forced end |
#own_rec ⇒ Object (readonly)
Returns the value of attribute own_rec.
294 295 296 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 294 def own_rec @own_rec end |
#own_rec_yards ⇒ Object (readonly)
Returns the value of attribute own_rec_yards.
294 295 296 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 294 def own_rec_yards @own_rec_yards end |
#player ⇒ Object (readonly)
Returns the value of attribute player.
294 295 296 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 294 def player @player end |
#team ⇒ Object (readonly)
Returns the value of attribute team.
294 295 296 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 294 def team @team end |
Instance Method Details
#lost? ⇒ Boolean
306 307 308 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 306 def lost? @lost == 1 || @own_rec == 0 end |