Class: Sportradar::Api::Football::PlayFirstDownStatistics

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

Returns a new instance of PlayFirstDownStatistics.



191
192
193
194
195
196
# File 'lib/sportradar/api/football/play_statistics.rb', line 191

def initialize(data)
  @response = data
  @category   = data['category']
  @team       = OpenStruct.new(data['team']) if data['team']
  @nullified  = data['nullified']
end

Instance Attribute Details

#categoryObject

Returns the value of attribute category.



190
191
192
# File 'lib/sportradar/api/football/play_statistics.rb', line 190

def category
  @category
end

#nullifiedObject

Returns the value of attribute nullified.



190
191
192
# File 'lib/sportradar/api/football/play_statistics.rb', line 190

def nullified
  @nullified
end

#teamObject

Returns the value of attribute team.



190
191
192
# File 'lib/sportradar/api/football/play_statistics.rb', line 190

def team
  @team
end

Instance Method Details

#nullified?Boolean

Returns:

  • (Boolean)


198
199
200
# File 'lib/sportradar/api/football/play_statistics.rb', line 198

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