Class: Djin::IncludeConfigLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/djin/include_config_loader.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(base_directory: '.', remote_directory: '~/.djin/remote', entity_class: Djin::IncludeConfig) ⇒ IncludeConfigLoader

Returns a new instance of IncludeConfigLoader.



12
13
14
15
16
17
# File 'lib/djin/include_config_loader.rb', line 12

def initialize(base_directory: '.', remote_directory: '~/.djin/remote', entity_class: Djin::IncludeConfig)
  # TODO: Use chain of responsability
  @base_directory = Pathname.new(base_directory)
  @remote_directory = Pathname.new(remote_directory)
  @entity_class = entity_class
end

Class Method Details

.load!(include_djin_config, **options) ⇒ Object



8
9
10
# File 'lib/djin/include_config_loader.rb', line 8

def self.load!(include_djin_config, **options)
  new(**options).load!(include_djin_config)
end

Instance Method Details

#load!(include_djin_config) ⇒ Object



19
20
21
# File 'lib/djin/include_config_loader.rb', line 19

def load!(include_djin_config)
  load_configs(include_djin_config)
end