Sha256: 4dd24004fd8b845dfcab0c135f4ea72f23128fcff55b17a8ec9dd8b22461a9d5

Contents?: true

Size: 806 Bytes

Versions: 9

Compression:

Stored size: 806 Bytes

Contents

# frozen_string_literal: true

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

    def cache_home
      cache.home
    end

    def config_home
      config.home
    end

    def config_dirs
      config.directories
    end

    def data_home
      data.home
    end

    def data_dirs
      data.directories
    end

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

    private

    attr_reader :cache, :config, :data
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
xdg-5.1.0 lib/xdg/environment.rb
xdg-5.0.0 lib/xdg/environment.rb
xdg-4.5.0 lib/xdg/environment.rb
xdg-4.4.0 lib/xdg/environment.rb
xdg-4.3.0 lib/xdg/environment.rb
xdg-4.2.0 lib/xdg/environment.rb
xdg-4.1.0 lib/xdg/environment.rb
xdg-4.0.1 lib/xdg/environment.rb
xdg-4.0.0 lib/xdg/environment.rb