def map_league_to_sport(league)
      result = { league: league.to_s, sport: nil }

      LEAGUE_MAP.each do |sport, leagues|
        if leagues.include? result[:league]
          result[:sport] = sport.to_s
          break
        end
      end

      result
    end
def map_league_to_sport(league)
      result = { league: league.to_s, sport: nil }

      LEAGUE_MAP.each do |sport, leagues|
        if leagues.include? result[:league]
          result[:sport] = sport.to_s
          break
        end
      end

      result
    end
Public: Map a league to a sport.

 league - The league (String or Symbol) to map to a sport.

 Examples

   map_league_to_sport(:nhl)
   # => { league: 'nhl', sport: 'hockey' }
   map_league_to_sport('mlb')
   # => { league: 'mlb', sport: 'baseball' }
   map_league_to_sport('some-random-league')
   # => { league: 'some-random-league', sport: '' }

 Returns a Hash.