Class: Sportradar::Api::Football::MiscStatistics
- Defined in:
- lib/sportradar/api/football/play_statistics.rb
Instance Attribute Summary collapse
-
#player ⇒ Object
readonly
Returns the value of attribute player.
-
#team ⇒ Object
readonly
Returns the value of attribute team.
-
#yards ⇒ Object
readonly
Returns the value of attribute yards.
Instance Method Summary collapse
-
#initialize(data) ⇒ MiscStatistics
constructor
A new instance of MiscStatistics.
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) ⇒ MiscStatistics
Returns a new instance of MiscStatistics.
86 87 88 89 90 91 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 86 def initialize(data) @response = data @yards = data['yards'] || data['yds'] @team = OpenStruct.new(data['team']) if data['team'] @player = OpenStruct.new(data['player']) if data['player'] end |
Instance Attribute Details
#player ⇒ Object (readonly)
Returns the value of attribute player.
85 86 87 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 85 def player @player end |
#team ⇒ Object (readonly)
Returns the value of attribute team.
85 86 87 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 85 def team @team end |
#yards ⇒ Object (readonly)
Returns the value of attribute yards.
85 86 87 |
# File 'lib/sportradar/api/football/play_statistics.rb', line 85 def yards @yards end |