class Attractor::Cache
Public Class Methods
clear()
click to toggle source
# File lib/attractor/cache.rb, line 21 def clear adapter.clear end
persist!()
click to toggle source
# File lib/attractor/cache.rb, line 17 def persist! adapter.persist! end
read(file_path:)
click to toggle source
# File lib/attractor/cache.rb, line 9 def read(file_path:) adapter.read(file_path: file_path) end
write(file_path:, value:)
click to toggle source
# File lib/attractor/cache.rb, line 13 def write(file_path:, value:) adapter.write(file_path: file_path, value: value) end
Private Class Methods
adapter()
click to toggle source
# File lib/attractor/cache.rb, line 27 def adapter @@adapter ||= CacheAdapter::JSON.instance end