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