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