Class: AhlScraper::Players::DraftInfo

Inherits:
Resource
  • Object
show all
Defined in:
lib/ahl_scraper/resources/players/draft_info.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

#descriptionObject



42
43
44
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 42

def description
  @description ||= @raw_data[:draft_text]&.strip
end

#idObject



6
7
8
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 6

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

#junior_teamObject



34
35
36
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 34

def junior_team
  @junior_team ||= @raw_data[:draft_junior_team]
end

#leagueObject



10
11
12
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 10

def league
  @draft_league ||= @raw_data[:draft_league]
end

#rankObject



30
31
32
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 30

def rank
  @rank ||= @raw_data[:draft_rank]&.to_i
end

#roundObject



26
27
28
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 26

def round
  @round ||= @raw_data[:draft_round]&.to_i
end

#team_idObject



18
19
20
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 18

def team_id
  @team_id ||= @raw_data[:draft_team_id]&.to_i
end

#team_logoObject



38
39
40
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 38

def 
  @team_logo ||= @raw_data[:draft_logo]
end

#team_nameObject



14
15
16
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 14

def team_name
  @team_name ||= @raw_data[:draft_team]
end

#yearObject



22
23
24
# File 'lib/ahl_scraper/resources/players/draft_info.rb', line 22

def year
  @year ||= @raw_data[:draft_year]&.to_i
end