Class: AhlScraper::SeasonGameIdsFetcher
- Inherits:
-
Object
- Object
- AhlScraper::SeasonGameIdsFetcher
- Defined in:
- lib/ahl_scraper/fetchers/season_game_ids_fetcher.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(season_id) ⇒ SeasonGameIdsFetcher
constructor
A new instance of SeasonGameIdsFetcher.
Constructor Details
#initialize(season_id) ⇒ SeasonGameIdsFetcher
Returns a new instance of SeasonGameIdsFetcher.
5 6 7 |
# File 'lib/ahl_scraper/fetchers/season_game_ids_fetcher.rb', line 5 def initialize(season_id) @season_id = season_id end |
Instance Method Details
#call ⇒ Object
9 10 11 12 13 |
# File 'lib/ahl_scraper/fetchers/season_game_ids_fetcher.rb', line 9 def call JSON.parse(Nokogiri::HTML(URI.parse(url).open) .text[5..-2], symbolize_names: true) .dig(0, :sections, 0, :data) end |