Class: XDG::Config

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/xdg/config.rb

Overview

Provides configuration support.

Constant Summary collapse

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

Instance Method Summary collapse

Constructor Details

#initialize(home: Paths::Home, directories: Paths::Directory, environment: ENV) ⇒ Config

Returns a new instance of Config.



16
17
18
19
# File 'lib/xdg/config.rb', line 16

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

Instance Method Details

#inspectObject



21
# File 'lib/xdg/config.rb', line 21

def inspect = "#<#{self.class}:#{object_id} #{self}>"