Class: Xmlstats::Endpoints::MlbTeams

Inherits:
Object
  • Object
show all
Includes:
Xmlstats::Endpoint
Defined in:
lib/xmlstats/endpoints/mlb_teams.rb

Class Method Summary collapse

Methods included from Xmlstats::Endpoint

included

Class Method Details

.fetchObject



5
6
7
8
9
10
11
# File 'lib/xmlstats/endpoints/mlb_teams.rb', line 5

def self.fetch
  response = fetch_json("mlb/teams")

  response.map do |team|
    Xmlstats::Objects::Team.new team
  end
end