module

Xssmaze::Solutions

Compile-time answer key. The solutions/ tree carries a ground-truth payload and injection context for every maze; embedding it here the way Xssmaze::VERSION embeds shard.yml keeps the binary self-contained, so the Docker image ships the answer key without shipping the directory. Parity with the live catalog is enforced by spec/solutions_spec.cr, so the two can never drift apart again.

Constants

ENTRIES = begin parsed = {} of String => Solution MARKDOWN.each_value do |md| parse_into(md, parsed) end parsed end

maze name -> Solution, parsed once at boot from the embedded markdown.

MARKDOWN = embed_solutions

category -> markdown body (what GET /solutions/<category> serves).

Class methods

categories

Every category name that has a markdown page, sorted for stable output.

Source
entries

maze name -> Solution.

Source
json_body

Every entry keyed by maze name, for GET /solutions.json. Keys are sorted so the body — and therefore its cached ETag — is stable across boots.

Source
markdown(category : String) : String | Nil

Raw markdown for one category, or nil if there is no such page.

Source

Nested types