Sha256: 8d65b6a045d0f1d352264b36aca455771fd12dba71b3fd2c0b6a0c4df2a58a77
Contents?: true
Size: 610 Bytes
Versions: 17
Compression:
Stored size: 610 Bytes
Contents
module Sportradar module Api module Odds class PlayerProp < Data attr_accessor :response, :api, :id def initialize(data, **opts) @response = data @api = opts[:api] @id = data.dig("player", "id") @markets_hash = {} update(data, **opts) end def markets @markets_hash.values end def update(data, **opts) create_data(@markets_hash, data['markets'], klass: Market, api: api, player: data['player']) if data['markets'] end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems