Sha256: e36d1fbb3d58a3ee9a282c01966c04711985383cd29df94540d12bbe0c32a624

Contents?: true

Size: 734 Bytes

Versions: 5

Compression:

Stored size: 734 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

    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

5 entries across 5 versions & 1 rubygems

Version Path
xdg-5.3.0 lib/xdg/environment.rb
xdg-5.2.0 lib/xdg/environment.rb
xdg-5.1.3 lib/xdg/environment.rb
xdg-5.1.2 lib/xdg/environment.rb
xdg-5.1.1 lib/xdg/environment.rb