Method: Application::Configuration#load_file

Defined in:
lib/application_configuration.rb

#load_file(path_to_file) ⇒ Object



53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/application_configuration.rb', line 53

def load_file(path_to_file)
  unless path_to_file.nil?
    begin
      path_to_file = Application::Configuration::Location.new(path_to_file) if path_to_file.is_a? String
      settings = load_from_file(path_to_file.name)
      handle_settings(settings, path_to_file)
      return self
    rescue Exception => e
      puts e.message
      return nil
    end
  end
end