Class: AocCli::Day::Cache
Instance Attribute Summary
Attributes inherited from Pages
Attributes inherited from Init
Instance Method Summary collapse
-
#initialize(u: Metafile.get(:user), y: Metafile.get(:year), d: Metafile.get(:day), f: [:Input, :Puzzle]) ⇒ Cache
constructor
A new instance of Cache.
- #query ⇒ Object
Methods inherited from Pages
#cache, #copy, #download, #load
Methods inherited from Init
Constructor Details
#initialize(u: Metafile.get(:user), y: Metafile.get(:year), d: Metafile.get(:day), f: [:Input, :Puzzle]) ⇒ Cache
Returns a new instance of Cache.
52 53 54 55 56 57 58 |
# File 'lib/aoc_cli/day.rb', line 52 def initialize(u:Metafile.get(:user), y:Metafile.get(:year), d:Metafile.get(:day), f:[:Input, :Puzzle]) super(u:u, y:y, d:d, f:f) paths.create_cache end |
Instance Method Details
#query ⇒ Object
59 60 61 |
# File 'lib/aoc_cli/day.rb', line 59 def query files.map{|file| [file, read(file:file)]}.to_h end |