Class: Sportradar::Api::Football::ConversionStatistics

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

Returns a new instance of ConversionStatistics.



362
363
364
365
366
367
368
369
370
# File 'lib/sportradar/api/football/play_statistics.rb', line 362

def initialize(data)
  @response = data
  @stat_type  = data['stat_type']
  @attempt    = data['attempt'] || data['att']
  @complete   = data['complete'] || data['cmp']
  @category   = data['category']
  @team         = OpenStruct.new(data['team']) if data['team']
  @player       = OpenStruct.new(data['player']) if data['player']
end

Instance Attribute Details

#attemptObject (readonly)

Returns the value of attribute attempt.



361
362
363
# File 'lib/sportradar/api/football/play_statistics.rb', line 361

def attempt
  @attempt
end

#categoryObject (readonly)

Returns the value of attribute category.



361
362
363
# File 'lib/sportradar/api/football/play_statistics.rb', line 361

def category
  @category
end

#completeObject (readonly)

Returns the value of attribute complete.



361
362
363
# File 'lib/sportradar/api/football/play_statistics.rb', line 361

def complete
  @complete
end

#playerObject (readonly)

Returns the value of attribute player.



361
362
363
# File 'lib/sportradar/api/football/play_statistics.rb', line 361

def player
  @player
end

#stat_typeObject (readonly)

Returns the value of attribute stat_type.



361
362
363
# File 'lib/sportradar/api/football/play_statistics.rb', line 361

def stat_type
  @stat_type
end

#teamObject (readonly)

Returns the value of attribute team.



361
362
363
# File 'lib/sportradar/api/football/play_statistics.rb', line 361

def team
  @team
end