class Runcom::Paths::Home

A XDG home path that prefers local over global path.

Public Class Methods

new(pair, environment = ENV) click to toggle source
# File lib/runcom/paths/home.rb, line 14
def initialize pair, environment = ENV
  @standard = XDG::Paths::Home.new pair, environment
end

Public Instance Methods

dynamic() click to toggle source
# File lib/runcom/paths/home.rb, line 18
def dynamic
  String(value).then do |path|
    File.exist?(path) ? Pathname(path).expand_path : standard.dynamic
  end
end
inspect(= [standard.key, dynamic].compact.join(XDG::PAIR_DELIMITER)) click to toggle source
# File lib/runcom/paths/home.rb, line 24
  def inspect = [standard.key, dynamic].compact.join(XDG::PAIR_DELIMITER)

  private

  attr_reader :standard
end