Sha256: 89a4ba9c75ac3979a4059e3390fb0ab5ec1e1565d327f93c4345d2f8b14b3f27
Contents?: true
Size: 863 Bytes
Versions: 32
Compression:
Stored size: 863 Bytes
Contents
module Sportradar module Api class Soccer::Category < Data attr_accessor :response, :id, :name, :country_code, :country, :tournament_groups def initialize(data) @response = data @id = data["id"] @name = data["name"] @country_code = data["country_code"] @country = data["country"] set_tournament_group end private def set_tournament_group if response["tournament_group"] if response["tournament_group"].is_a?(Array) @tournament_groups = response["tournament_group"].map {|x| Sportradar::Api::Soccer::TournamentGroup.new x } elsif response["tournament_group"].is_a?(Hash) @tournament_groups = [ Sportradar::Api::Soccer::TournamentGroup.new(response["tournament_group"]) ] end end end end end end
Version data entries
32 entries across 32 versions & 1 rubygems