class Runcom::XDG::Configuration

Represents X Desktop Group (XGD) configuration support. XGD is also known as [Free Desktop](www.freedesktop.org). Here is the exact [specification](standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) being for this implementation.

Public Class Methods

computed_dirs() click to toggle source
# File lib/runcom/xdg/configuration.rb, line 19
def self.computed_dirs
  directories = dirs.unshift(home_dir).map { |directory| Pathname(directory).expand_path }
  directories.select(&:exist?)
end
dirs() click to toggle source
# File lib/runcom/xdg/configuration.rb, line 15
def self.dirs
  ENV.fetch("XDG_CONFIG_DIRS", "/etc/xdg").split ":"
end
home_dir() click to toggle source
# File lib/runcom/xdg/configuration.rb, line 11
def self.home_dir
  ENV.fetch "XDG_CONFIG_HOME", File.join(ENV["HOME"], ".config")
end