Sha256: 024fe35e33aeef401b17c07407d1f8e450fc0af2e82ae3fc5c68e41f6cba2c64

Contents?: true

Size: 650 Bytes

Versions: 2

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

module XDG
  class Environment
    def initialize home: Paths::Home, directories: Paths::Directory, environment: ENV
      @cache = Cache.new(home:, directories:, environment:)
      @config = Config.new(home:, directories:, environment:)
      @data = Data.new(home:, directories:, environment:)
    end

    def cache_home = cache.home

    def config_home = config.home

    def config_dirs = config.directories

    def data_home = data.home

    def data_dirs = data.directories

    def inspect = "#{cache.inspect} #{config.inspect} #{data.inspect}"

    private

    attr_reader :cache, :config, :data
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xdg-6.0.1 lib/xdg/environment.rb
xdg-6.0.0 lib/xdg/environment.rb