Method: Cfer::Config#include_config

Defined in:
lib/cfer/config.rb

#include_config(*files) ⇒ Object

Includes config code from one or more files, and evals it in the context of this stack. Filenames are relative to the file containing the invocation of this method.



34
35
36
37
38
39
40
# File 'lib/cfer/config.rb', line 34

def include_config(*files)
  include_base = File.dirname(@config_file) if @config_file
  files.each do |file|
    path = File.join(include_base, file) if include_base
    include_file(path || file)
  end
end