Sha256: f579b0960f64318743f7b416480fa7ed5349e308168d9fd84523c058f5f6136f

Contents?: true

Size: 859 Bytes

Versions: 4

Compression:

Stored size: 859 Bytes

Contents

# frozen_string_literal: true

module Runcom
  module XDG
    # A XDG environment that provides access to all variables.
    class Environment
      def initialize home: Paths::Standard, 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

      private

      attr_reader :cache, :config, :data
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
runcom-4.2.1 lib/runcom/xdg/environment.rb
runcom-4.2.0 lib/runcom/xdg/environment.rb
runcom-4.1.0 lib/runcom/xdg/environment.rb
runcom-4.0.0 lib/runcom/xdg/environment.rb