Class: AdventOfCodeGenerator::Scraper

Inherits:
Object
  • Object
show all
Defined in:
lib/advent_of_code_generator/scraper.rb

Overview

Fetches puzzle descriptions and input data from adventofcode.com.

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Scraper

Returns a new instance of Scraper.



9
10
11
12
13
# File 'lib/advent_of_code_generator/scraper.rb', line 9

def initialize(options)
  @year = options[:year]
  @day = options[:day]
  @session_key = options[:session]
end

Instance Method Details

#callObject



15
16
17
18
19
20
# File 'lib/advent_of_code_generator/scraper.rb', line 15

def call
  {
    puzzle_description:,
    input_data:
  }
end