Skip to content
Kward Search API index

Module: Kward::ConfigPaths

Defined in:
lib/kward/config/paths.rb

Overview

Shared user configuration location; resolving it does not load any config.

Class Method Summary collapse

Class Method Details

.config_dir ⇒ Object



4
5
6
7
8
9
# File 'lib/kward/config/paths.rb', line 4

def self.config_dir
  path = ENV["KWARD_CONFIG_PATH"]
  return File.expand_path(File.dirname(path)) if path && !path.empty?

  File.expand_path("~/.kward")
end