Class: LazyNames::ConfigLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/lazy_names/config_loader.rb

Defined Under Namespace

Classes: BasicConfig, ConfigNotResolved, NamespaceNotFound, NoConfig, NoDefinitions, YAMLConfigInvalid

Constant Summary collapse

HOME_PATH =
'~/.lazy_names.yml'

Class Method Summary collapse

Class Method Details

.call(namespace:, path: nil) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/lazy_names/config_loader.rb', line 17

def call(namespace:, path: nil)
  return read_from_path(namespace, path) if path

  config = read_from_project if config_in_project_path?
  config ||= read_from_home_dir(namespace)

  config
end