Module: Mnogootex::Cfg
- Defined in:
- lib/mnogootex/cfg.rb
Constant Summary collapse
- BASENAME =
'.mnogootex.yml'- DEFAULTS =
YAML.load_file(Pathname.new(__dir__).join('defaults.yml'))
Class Method Summary collapse
Class Method Details
.load_descending(pathname:, basename:) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/mnogootex/cfg.rb', line 13 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
21 22 23 |
# File 'lib/mnogootex/cfg.rb', line 21 def self.recombobulate(*args) try_args(*args) || try_link(*args) || try_cfgs(*args) end |