Sha256: a24c16ff75155bc5f588a6e4d1779743747d5ec41119c03ec0c0ecd91c68a0d7
Contents?: true
Size: 415 Bytes
Versions: 8
Compression:
Stored size: 415 Bytes
Contents
require 'tmpdir' class Rack::PageSpeed::Store::Disk def initialize path = Dir.tmpdir raise ArgumentError, "#{path} is not a directory" unless File.directory? path @path = path end def [] key path = "#{@path}/rack-pagespeed-#{key}" File.read path if File.exists? path end def []= key, value File.open("#{@path}/rack-pagespeed-#{key}", 'w') { |file| file << value } true end end
Version data entries
8 entries across 8 versions & 1 rubygems