Class: Sportradar::Api::Football::ConversionStatistics
- Defined in:
- lib/sportradar/api/football/play_statistics.rb
Instance Attribute Summary collapse
-
#attempt ⇒ Object
readonly
Returns the value of attribute attempt.
-
#category ⇒ Object
readonly
Returns the value of attribute category.
-
#complete ⇒ Object
readonly
Returns the value of attribute complete.
-
#player ⇒ Object
readonly
Returns the value of attribute player.
-
#stat_type ⇒ Object
readonly
Returns the value of attribute stat_type.
-
#team ⇒ Object
readonly
Returns the value of attribute team.
Instance Method Summary collapse
-
#initialize(data) ⇒ ConversionStatistics
constructor
A new instance of ConversionStatistics.
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
#attempt ⇒ Object (readonly)
Returns the value of attribute attempt.
361 362 363 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 361 def attempt @attempt end |
#category ⇒ Object (readonly)
Returns the value of attribute category.
361 362 363 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 361 def category @category end |
#complete ⇒ Object (readonly)
Returns the value of attribute complete.
361 362 363 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 361 def complete @complete end |
#player ⇒ Object (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_type ⇒ Object (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 |
#team ⇒ Object (readonly)
Returns the value of attribute team.
361 362 363 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 361 def team @team end |