Sha256: 0f99a3dd6fc08213dcf98496573a462439ccc5e143b88193d019c055c25a7060

Contents?: true

Size: 541 Bytes

Versions: 3

Compression:

Stored size: 541 Bytes

Contents

# frozen_string_literal: true

require "forwardable"

module XDG
  # Provides cache support.
  class Cache
    extend Forwardable

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

    delegate %i[home directories all inspect] => :combined

    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

    private

    attr_reader :combined
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
xdg-6.6.2 lib/xdg/cache.rb
xdg-6.6.1 lib/xdg/cache.rb
xdg-6.6.0 lib/xdg/cache.rb