Method: Application::Configuration#load_url

Defined in:
lib/application_configuration.rb

#load_url(path_to_file) ⇒ Object



67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/application_configuration.rb', line 67

def load_url(path_to_file)
  require 'open-uri'
  unless path_to_file.nil?
    begin
      path_to_file = Application::Configuration::Location.new(path_to_file, Application::Configuration::Location::URL) if path_to_file.is_a? String
      settings = load_from_url(path_to_file.name)
      handle_settings(settings, path_to_file)
      return self
    rescue Exception => e
      puts e.message
      return nil
    end
  end
end