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