Class: Sportradar::Api::Football::PlayDownConversionStatistics

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

Returns a new instance of PlayDownConversionStatistics.



107
108
109
110
111
112
113
114
115
# File 'lib/sportradar/api/football/play_statistics.rb', line 107

def initialize(data)
  @response = data
  @attempt   = data['attempt']
  @complete  = data['complete']
  @down      = data['down']
  @team      = OpenStruct.new(data['team']) if data['team']
  @player    = OpenStruct.new(data['player']) if data['player']
  @nullified = data['nullified']
end

Instance Attribute Details

#attemptObject

Returns the value of attribute attempt.



106
107
108
# File 'lib/sportradar/api/football/play_statistics.rb', line 106

def attempt
  @attempt
end

#completeObject

Returns the value of attribute complete.



106
107
108
# File 'lib/sportradar/api/football/play_statistics.rb', line 106

def complete
  @complete
end

#downObject

Returns the value of attribute down.



106
107
108
# File 'lib/sportradar/api/football/play_statistics.rb', line 106

def down
  @down
end

#nullifiedObject

Returns the value of attribute nullified.



106
107
108
# File 'lib/sportradar/api/football/play_statistics.rb', line 106

def nullified
  @nullified
end

#playerObject

Returns the value of attribute player.



106
107
108
# File 'lib/sportradar/api/football/play_statistics.rb', line 106

def player
  @player
end

#teamObject

Returns the value of attribute team.



106
107
108
# File 'lib/sportradar/api/football/play_statistics.rb', line 106

def team
  @team
end

Instance Method Details

#nullified?Boolean

Returns:

  • (Boolean)


117
118
119
# File 'lib/sportradar/api/football/play_statistics.rb', line 117

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