initial commit

This commit is contained in:
2026-10-25 23:19:29 -06:00
commit 5a3e877217
43 changed files with 2780 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
# frozen_string_literal: true
module FO
class Cache
def initialize(init = {})
@c = init
end
def file!(path)
if @c[path].nil?
return @c[path] = File.read(path)
end
@c[path]
end
def get(k)
@c.fetch(k)
end
def set!(k, v)
@c[k] = v
end
def set(k, v)
self.class.new(@c.merge(k => v))
end
end
end