Class: Sportradar::Api::Football::BlockStatistics

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

Returns a new instance of BlockStatistics.



96
97
98
99
100
101
102
# File 'lib/sportradar/api/football/play_statistics.rb', line 96

def initialize(data)
  @response = data
  @category       = data['category']
  @block          = data['block'] || data['blk']
  @team           = OpenStruct.new(data['team']) if data['team']
  @player         = OpenStruct.new(data['player']) if data['player']
end

Instance Attribute Details

#blockObject (readonly)

Returns the value of attribute block.



95
96
97
# File 'lib/sportradar/api/football/play_statistics.rb', line 95

def block
  @block
end

#categoryObject (readonly)

Returns the value of attribute category.



95
96
97
# File 'lib/sportradar/api/football/play_statistics.rb', line 95

def category
  @category
end

#playerObject (readonly)

Returns the value of attribute player.



95
96
97
# File 'lib/sportradar/api/football/play_statistics.rb', line 95

def player
  @player
end

#teamObject (readonly)

Returns the value of attribute team.



95
96
97
# File 'lib/sportradar/api/football/play_statistics.rb', line 95

def team
  @team
end