Sha256: 862d98ad7492907b0517baeb1501650f634fd4dbda68dcbcdcfc75113d756f8f
Contents?: true
Size: 743 Bytes
Versions: 19
Compression:
Stored size: 743 Bytes
Contents
module Sportradar module Api class Soccer::Boxscore < Data attr_accessor :response, :matches def initialize(data) @response = data set_matches end private def set_matches if response['boxscore'] && response['boxscore']['matches'] && response["boxscore"]["matches"]["match"] if response["boxscore"]["matches"]["match"].is_a?(Array) @matches = response["boxscore"]["matches"]["match"].map {|x| Sportradar::Api::Soccer::Match.new x } elsif response["boxscore"]["matches"]["match"].is_a?(Hash) @matches = [ Sportradar::Api::Soccer::Match.new(response["boxscore"]["matches"]["match"]) ] end end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems