Module: Brightbox::Config::Cache
- Included in:
- BBConfig
- Defined in:
- lib/brightbox-cli/config/cache.rb
Instance Method Summary collapse
Instance Method Details
#cache_id(cid) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/brightbox-cli/config/cache.rb', line 8 def cache_id(cid) return if cid.nil? unless File.exist?(cache_path) begin FileUtils.mkpath(cache_path) rescue Errno::EEXIST end end FileUtils.touch(File.join(cache_path, cid)) unless cid.nil? end |
#cache_path ⇒ Object
4 5 6 |
# File 'lib/brightbox-cli/config/cache.rb', line 4 def cache_path File.join(config_directory, "cache") end |