Sha256: 5f123df1137af8045ca4330ef06dafd3df5814d72683e975f753cbf68f5a9f4b
Contents?: true
Size: 707 Bytes
Versions: 1
Compression:
Stored size: 707 Bytes
Contents
# frozen_string_literal: true require "forwardable" require "xdg/pair" module XDG # Provides configuration support. 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 to_s to_str] => :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) freeze end def inspect = "#<#{self.class}:#{object_id} #{self}>" private attr_reader :combined end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xdg-9.0.0 | lib/xdg/config.rb |