Class: AdventOfCodeGenerator::HTMLParser
- Inherits:
-
Object
- Object
- AdventOfCodeGenerator::HTMLParser
- Defined in:
- lib/advent_of_code_generator/html_parser.rb
Overview
Converts HTML puzzle descriptions from adventofcode.com into markdown format.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(html_content) ⇒ HTMLParser
constructor
A new instance of HTMLParser.
Constructor Details
#initialize(html_content) ⇒ HTMLParser
Returns a new instance of HTMLParser.
8 9 10 |
# File 'lib/advent_of_code_generator/html_parser.rb', line 8 def initialize(html_content) @html_content = html_content end |
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/advent_of_code_generator/html_parser.rb', line 12 def call { puzzle_description: part_descriptions.join("\n"), test_input:, test_expectations: } end |