Sha256: 9e5f2db9c3edaf31b7fc5299df74d7842baf7b174aec2e90592ddb5d75843377
Contents?: true
Size: 563 Bytes
Versions: 1
Compression:
Stored size: 563 Bytes
Contents
# frozen_string_literal: true module MLBStatsAPI class Team < Base def id = @data['id'] def name = @data['teamName'] def location = @data['locationName'] def abbreviation = @data['abbreviation'] alias code abbreviation def file_code = @data['fileCode'] def short_name = @data['shortName'] def league_id = @data.dig('league', 'id') def division_id = @data.dig('division', 'id') def full_name = @data['name'] # So we don't get huge printouts def inspect = %(#<MLBGameday::Team @name="#{name}">) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mlb_stats_api-0.4.0 | lib/mlb_stats_api/team.rb |