Class: Sportradar::Api::Football::PlayDefenseStatistics

Inherits:
Data
  • Object
show all
Defined in:
lib/sportradar/api/football/play_statistics.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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) ⇒ PlayDefenseStatistics

Returns a new instance of PlayDefenseStatistics.



124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/sportradar/api/football/play_statistics.rb', line 124

def initialize(data)
  @response = data
  @ast_tackle     = data['ast_tackle']
  @interception   = data['interception']
  @int_yards      = data['int_yards']
  @int_touchdown  = data['int_touchdown']
  @nullified      = data['nullified']
  @pass_defended  = data['pass_defended']
  @primary        = data['primary']
  @qb_hit         = data['qb_hit']
  @sack           = data['sack']
  @sack_yards     = data['sack_yards']
  @tlost          = data['tlost']
  @tlost_yards    = data['tlost_yards']
  @tackle         = data['tackle']
  @team           = OpenStruct.new(data['team']) if data['team']
  @player         = OpenStruct.new(data['player']) if data['player']
  @nullified      = data['nullified']
end

Instance Attribute Details

#ast_tackleObject

Returns the value of attribute ast_tackle.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def ast_tackle
  @ast_tackle
end

#int_touchdownObject

Returns the value of attribute int_touchdown.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def int_touchdown
  @int_touchdown
end

#int_yardsObject

Returns the value of attribute int_yards.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def int_yards
  @int_yards
end

#interceptionObject

Returns the value of attribute interception.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def interception
  @interception
end

#nullifiedObject

Returns the value of attribute nullified.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def nullified
  @nullified
end

#pass_defendedObject

Returns the value of attribute pass_defended.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def pass_defended
  @pass_defended
end

#playerObject

Returns the value of attribute player.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def player
  @player
end

#primaryObject

Returns the value of attribute primary.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def primary
  @primary
end

#qb_hitObject

Returns the value of attribute qb_hit.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def qb_hit
  @qb_hit
end

#sackObject

Returns the value of attribute sack.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def sack
  @sack
end

#sack_yardsObject

Returns the value of attribute sack_yards.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def sack_yards
  @sack_yards
end

#tackleObject

Returns the value of attribute tackle.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def tackle
  @tackle
end

#teamObject

Returns the value of attribute team.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def team
  @team
end

#tlostObject

Returns the value of attribute tlost.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def tlost
  @tlost
end

#tlost_yardsObject

Returns the value of attribute tlost_yards.



123
124
125
# File 'lib/sportradar/api/football/play_statistics.rb', line 123

def tlost_yards
  @tlost_yards
end

Instance Method Details

#nullified?Boolean

Returns:

  • (Boolean)


144
145
146
# File 'lib/sportradar/api/football/play_statistics.rb', line 144

def nullified?
  @nullified.to_s == 'true'
end