lib/legion/settings.rb in legion-settings-0.1.0 vs lib/legion/settings.rb in legion-settings-0.1.1
- old
+ new
@@ -2,13 +2,11 @@
require 'legion/settings/version'
require 'legion/json/parse_error'
require 'legion/settings/loader'
module Legion
- # Base Legion::Settings module
module Settings
- # Base settings, needs to be refactored
class << self
attr_accessor :loader
def load(options = {})
@loader = Legion::Settings::Loader.new
@loader.load_env
@@ -23,16 +21,16 @@
def get(options = {})
@loader || @loader = load(options)
end
def [](key)
- Legion::Logging.warn('Legion::Settings was not loading, auto loading now!') if @loader.nil?
+ Legion::Logging.info('Legion::Settings was not loading, auto loading now!') if @loader.nil?
@loader = load if @loader.nil?
@loader[key]
end
def set_prop(key, value)
- Legion::Logging.warn('Legion::Settings was not loading, auto loading now!') if @loader.nil?
+ Legion::Logging.info('Legion::Settings was not loading, auto loading now!') if @loader.nil?
@loader = load if @loader.nil?
@loader[key] = value
end
end
end