Sha256: c56931d5bc641a16a250faeab80a82ec250b40a4ba5f5fc26ab7bd25611909a0

Contents?: true

Size: 517 Bytes

Versions: 2

Compression:

Stored size: 517 Bytes

Contents

# frozen_string_literal: true

require "forwardable"

module XDG
  class Cache
    extend Forwardable

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

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

    def initialize home: Paths::Standard, 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

2 entries across 2 versions & 1 rubygems

Version Path
xdg-3.1.1 lib/xdg/cache.rb
xdg-3.1.0 lib/xdg/cache.rb