Class: MLB::GameUniforms
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- MLB::GameUniforms
- Defined in:
- lib/mlb/uniforms.rb
Overview
Represents game uniform information for both teams
Class Method Summary collapse
-
.find(game:) ⇒ GameUniforms
Retrieves uniform information for a game.
Class Method Details
.find(game:) ⇒ GameUniforms
Retrieves uniform information for a game
65 66 67 68 69 |
# File 'lib/mlb/uniforms.rb', line 65 def self.find(game:) game_pk = game.respond_to?(:game_pk) ? game.game_pk : game response = CLIENT.get("uniforms/game?#{Utils.build_query(gamePk: game_pk)}") from_json(response) end |