Class: Feed2Gram::LoadsCache
- Inherits:
-
Object
- Object
- Feed2Gram::LoadsCache
- Defined in:
- lib/feed2gram/loads_cache.rb
Instance Method Summary collapse
Instance Method Details
#load(options) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/feed2gram/loads_cache.rb', line 9 def load() if File.exist?(.cache_path) puts "Loading cache from: #{.cache_path}" if .verbose yaml = YAML.load_file(.cache_path, permitted_classes: [Time]) Cache.new(**yaml) else puts "No cache found (looked at '#{.cache_path}'), initializing a new one" if .verbose Cache.new(posted: [], failed: [], skipped: []) end end |