Class: AhlScraper::Games::Star

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

#birthdateObject



34
35
36
# File 'lib/ahl_scraper/resources/games/star.rb', line 34

def birthdate
  @birthdate ||= @raw_data[:player][:info][:birthDate]
end

#first_nameObject



14
15
16
# File 'lib/ahl_scraper/resources/games/star.rb', line 14

def first_name
  @first_name ||= @raw_data[:player][:info][:firstName]
end

#goalie?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/ahl_scraper/resources/games/star.rb', line 38

def goalie?
  @goalie ||= @raw_data[:isGoalie]
end

#idObject



6
7
8
# File 'lib/ahl_scraper/resources/games/star.rb', line 6

def id
  @id ||= @raw_data[:player][:info][:id]
end

#image_urlObject



42
43
44
# File 'lib/ahl_scraper/resources/games/star.rb', line 42

def image_url
  @image_url ||= @raw_data[:playerImage]
end

#jersey_nameObject



26
27
28
# File 'lib/ahl_scraper/resources/games/star.rb', line 26

def jersey_name
  @jersey_name ||= @raw_data[:player][:info][:jerseyNumber]
end

#last_nameObject



18
19
20
# File 'lib/ahl_scraper/resources/games/star.rb', line 18

def last_name
  @last_name ||= @raw_data[:player][:info][:lastName]
end

#numberObject



10
11
12
# File 'lib/ahl_scraper/resources/games/star.rb', line 10

def number
  @number ||= @opts[:number]
end

#positionObject



30
31
32
# File 'lib/ahl_scraper/resources/games/star.rb', line 30

def position
  @position ||= @raw_data[:player][:info][:position]
end

#team_idObject



22
23
24
# File 'lib/ahl_scraper/resources/games/star.rb', line 22

def team_id
  @team_id ||= @raw_data[:team][:id]
end