Sha256: 1ad755fc69af4daf389704c3dc765f5bf9ef80e8f2d566c5659af8551df295b2

Contents?: true

Size: 576 Bytes

Versions: 24

Compression:

Stored size: 576 Bytes

Contents

# frozen_string_literal: true

require "forwardable"

module XDG
  class Config
    extend Forwardable

    HOME_PAIR = Pair["XDG_CONFIG_HOME", ".config"].freeze
    DIRS_PAIR = Pair["XDG_CONFIG_DIRS", "/etc/xdg"].freeze

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

    def initialize home: Paths::Home, directories: Paths::Directory, environment: ENV
      @combined = Paths::Combined.new home.new(HOME_PAIR, environment),
                                      directories.new(DIRS_PAIR, environment)
    end

    private

    attr_reader :combined
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
xdg-4.2.0 lib/xdg/config.rb
xdg-4.1.0 lib/xdg/config.rb
xdg-4.0.1 lib/xdg/config.rb
xdg-4.0.0 lib/xdg/config.rb