Sha256: 37c7f7804b90a4c049111e65388769896404ace9181690800ed3627676dc13ff
Contents?: true
Size: 506 Bytes
Versions: 11
Compression:
Stored size: 506 Bytes
Contents
module SportsDataApi module Mlb class League < JsonData def divisions @divisions ||= league[:divisions].map do |data| Division.new(data) end end def teams @teams ||= divisions.flat_map do |division| division.teams.flat_map do |team| team.tap do |t| t.team[:conference] = league[:alias] t.team[:conference_name] = league[:name] end end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems