Method: Tengine::Core::Config::Atd#initialize

Defined in:
lib/tengine/core/config/atd.rb

#initialize(hash_or_filepath = nil) ⇒ Atd

Returns a new instance of Atd.



52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/tengine/core/config/atd.rb', line 52

def initialize(hash_or_filepath = nil)
  build if respond_to?(:build)
  case hash_or_filepath
  when Hash then
    if config = hash_or_filepath[:config]
      load_file(config)
    else
      load(hash_or_filepath)
    end
  when String then load_file(hash_or_filepath)
  end
end