Class: XDG::Cache

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/xdg/cache.rb

Overview

Provides cache support.

Constant Summary collapse

HOME_PAIR =
Pair["XDG_CACHE_HOME", ".cache"].freeze

Instance Method Summary collapse

Constructor Details

#initialize(home: Paths::Home, directories: Paths::Directory, environment: ENV) ⇒ Cache

Returns a new instance of Cache.



15
16
17
18
# File 'lib/xdg/cache.rb', line 15

def initialize home: Paths::Home, directories: Paths::Directory, environment: ENV
  @combined = Paths::Combined.new home.new(HOME_PAIR, environment),
                                  directories.new(Pair.new, environment)
end

Instance Method Details

#inspectObject



20
# File 'lib/xdg/cache.rb', line 20

def inspect = "#<#{self.class}:#{object_id} #{self}>"