Sha256: 5136af015cdd58074ab3c8342a9b8eac26cc43027db70825d1c83c420c0a62b6
Contents?: true
Size: 696 Bytes
Versions: 14
Compression:
Stored size: 696 Bytes
Contents
module Sportradar module Api module Odds class Market < Data attr_accessor :response, :id, :name, :player def initialize(data, **opts) @response = data @api = opts[:api] @id = data['id'] @name = data['name'] @player = opts['player'] @book_markets_hash = {} update(data, **opts) end def book_markets @book_markets_hash.values end def update(data, **opts) create_data(@book_markets_hash, data['books'], klass: BookMarket, api: @api, market: self, player: @player) if data['books'] end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems