Module: Mnogootex::Cfg

Defined in:
lib/mnogootex/cfg.rb

Constant Summary collapse

BASENAME =
'.mnogootexrc'
DEFAULTS =
{
  'jobs' => [],
  'spinner' => '⣾⣽⣻⢿⡿⣟⣯⣷',
  'work_path' => nil,
}.freeze

Class Method Summary collapse

Class Method Details

.load_descending(pathname:, basename:) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/mnogootex/cfg.rb', line 15

def self.load_descending(pathname:, basename:)
  pathname.realpath.descend.
    map { |path| path.join(basename) }.
    select(&:exist?).reject(&:zero?).
    map { |path| YAML.load_file(path) }.
    reduce(&:merge!)
end

.recombobulate(*args) ⇒ Object



23
24
25
# File 'lib/mnogootex/cfg.rb', line 23

def self.recombobulate(*args)
  try_args(*args) || try_link(*args) || try_cfgs(*args)
end