nfl-teams

A simple library containing team name information about current NFL teams.

Usage

Install gem

gem install nfl-teams

Require gem

require "nfl_teams"

API Doc

A Team Hash includes:

  • :location - Example: "Green Bay"
  • :name - Example: "Packers"
  • :abbreviation - Example: "GB"

NFLTeams.all

Returns array of team hashes: [ { location: "Green Bay", name: "Packers", abbreviation: "GB" } , ... ]

NFLTeams.full_names

Returns array of team full names: [ "Arizona Cardinals", "Atlanta Falcons", ... ]

NFLTeams.abbreviation()

Returns the abbrevation for a team.

If given a name it will return an abbreviation or nil.

If given a location it will return an abbreviation, and array of abbrevations if there are multiple teams in that location, or nil.

Disclaimer

nfl-teams is in no way associated with the National Football League, and does not claim this data as its own.