Sha256: ed7bbb1b933ce0284f2736ddeffd8aec4a98f5a57e176b01531d27df65df6d0e
Contents?: true
Size: 577 Bytes
Versions: 10
Compression:
Stored size: 577 Bytes
Contents
module Sportradar module Api class Soccer::Schedule < Data attr_accessor :response, :matches def initialize(data) @response = data @matches = data["schedule"]["matches"]["match"].map {|x| Sportradar::Api::Soccer::Match.new x } if data["schedule"]["matches"]["match"] end def league(league_name) matches.select{ |match| match.tournament_group.name.parameterize == league_name.parameterize} end def available_leagues matches.map {|match| match.tournament_group.name}.uniq end end end end
Version data entries
10 entries across 10 versions & 1 rubygems