Class: AhlScraper::PlayoffBrackets::Team

Inherits:
Resource
  • Object
show all
Defined in:
lib/ahl_scraper/resources/playoff_brackets/team.rb

Instance Method Summary collapse

Methods inherited from Resource

#[], #each, #initialize, #inspect, #keys, #to_json, #values

Constructor Details

This class inherits a constructor from AhlScraper::Resource

Instance Method Details

#abbreviationObject



14
15
16
# File 'lib/ahl_scraper/resources/playoff_brackets/team.rb', line 14

def abbreviation
  @abbreviation ||= @raw_data[:team_code]
end

#cityObject



10
11
12
# File 'lib/ahl_scraper/resources/playoff_brackets/team.rb', line 10

def city
  @city ||= @raw_data[:city]
end

#conference_idObject



30
31
32
# File 'lib/ahl_scraper/resources/playoff_brackets/team.rb', line 30

def conference_id
  @conference_id ||= @raw_data[:conf_id].to_i
end

#divisionObject



26
27
28
# File 'lib/ahl_scraper/resources/playoff_brackets/team.rb', line 26

def division
  @division ||= @raw_data[:division_long_name]
end

#full_nameObject



18
19
20
# File 'lib/ahl_scraper/resources/playoff_brackets/team.rb', line 18

def full_name
  @full_name ||= @raw_data[:name]
end

#idObject



6
7
8
# File 'lib/ahl_scraper/resources/playoff_brackets/team.rb', line 6

def id
  @id ||= @raw_data[:id].to_i
end

#logo_urlObject



34
35
36
# File 'lib/ahl_scraper/resources/playoff_brackets/team.rb', line 34

def logo_url
  @logo_url ||= @raw_data[:logo]
end

#nameObject



22
23
24
# File 'lib/ahl_scraper/resources/playoff_brackets/team.rb', line 22

def name
  @name ||= @raw_data[:name].sub(city, "").strip
end