lib/sportradar/api/baseball/player.rb in sportradar-api-0.10.17 vs lib/sportradar/api/baseball/player.rb in sportradar-api-0.10.18
- old
+ new
@@ -5,11 +5,11 @@
attr_accessor :response, :id, :number, :full_name, :first_name, :last_name, :position, :birth_place, :college, :height, :weight, :draft, :hitting, :pitching, :fielding
def initialize(data, **opts)
@response = data # comment this out when done developing
@api = opts[:api]
- # @team = opts[:team]
+ @team = opts[:team]
@id = data["id"]
update(data, **opts)
end
@@ -59,10 +59,10 @@
update_injuries(data)
update_draft(data)
- # @team.update_player_stats(self, data['statistics'], opts[:game]) if data['statistics']
+ @team.update_player_stats(self, data['statistics'], opts[:game]) if data['statistics']
if stats = data['statistics']
@fielding = stats.dig('fielding', 'overall')
@pitching = stats.dig('pitching', 'overall')
@hitting = stats.dig('hitting', 'overall')