Sha256: da11fb17976f63f5c3a4c7a3fac33dccd6d9f86664543ddc7d9f6a733264cc09
Contents?: true
Size: 695 Bytes
Versions: 6
Compression:
Stored size: 695 Bytes
Contents
module Sportradar module Api module Football class StatPack < Data attr_accessor :response, :player, :name, :id, :position, :yards, :players def initialize(data) @response = data || {} @player = Sportradar::Api::Nfl::Player.new(response) if response['name'] # this isn't used yet, and we need to determine a better solution @players = parse_into_array(selector: response["player"], klass: Sportradar::Api::Nfl::Player) if response["player"] set_stats end private def set_stats raise NotImplementedError, "Please implement `#{self.class}#set_stats`" end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems