class Renuo::Cli::Services::Cache
Constants
- CACHE_DIR
Public Class Methods
Source
# File lib/renuo/cli/services/cache.rb, line 13 def restore(file_name) file_path = File.join(CACHE_DIR, "#{file_name}.yml") return nil unless File.exist?(file_path) YAML.load_file(file_path) end
Source
# File lib/renuo/cli/services/cache.rb, line 8 def store(file_name, object) file_path = File.join(CACHE_DIR, "#{file_name}.yml") File.write(file_path, YAML.dump(object)) end
Source
# File lib/renuo/cli/services/cache.rb, line 20 def stored_at(file_name) file_path = File.join(CACHE_DIR, "#{file_name}.yml") return nil unless File.exist?(file_path) File.mtime(file_path).localtime.strftime("%Y-%m-%d %H:%M") end