Sha256: 3f3fde019459741da830edfb3c2cb0406db6a4df3f6386be5c4c00f86c6337fc
Contents?: true
Size: 664 Bytes
Versions: 16
Compression:
Stored size: 664 Bytes
Contents
module Sportradar module Api class Nfl::Week < Data attr_accessor :response, :id, :sequence, :title, :games def initialize(data) @response = data @id = data["id"] @sequence = data["sequence"] @title = data["title"] set_games end private def set_games if response["game"] if response["game"].is_a?(Array) @games = response["game"].map {|game| Sportradar::Api::Nfl::Game.new game } elsif response["game"].is_a?(Hash) @games = [ Sportradar::Api::Nfl::Game.new(response["game"]) ] end end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems