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-6.5.0 lib/xdg/config.rb
xdg-6.4.0 lib/xdg/config.rb
xdg-6.3.3 lib/xdg/config.rb
xdg-6.3.2 lib/xdg/config.rb
xdg-6.3.1 lib/xdg/config.rb
xdg-6.3.0 lib/xdg/config.rb
xdg-6.2.0 lib/xdg/config.rb
xdg-6.1.0 lib/xdg/config.rb
xdg-6.0.1 lib/xdg/config.rb
xdg-6.0.0 lib/xdg/config.rb
xdg-5.3.0 lib/xdg/config.rb
xdg-5.2.0 lib/xdg/config.rb
xdg-5.1.3 lib/xdg/config.rb
xdg-5.1.2 lib/xdg/config.rb
xdg-5.1.1 lib/xdg/config.rb
xdg-5.1.0 lib/xdg/config.rb
xdg-5.0.0 lib/xdg/config.rb
xdg-4.5.0 lib/xdg/config.rb
xdg-4.4.0 lib/xdg/config.rb
xdg-4.3.0 lib/xdg/config.rb