lib/configatron/configatron.rb in configatron-2.11.0 vs lib/configatron/configatron.rb in configatron-2.12.0
- old
+ new
@@ -5,21 +5,26 @@
include Singleton
alias_method :send!, :send
class << self
-
+
+ attr_accessor :strict
+
def log
unless @logger
if defined?(::Rails)
@logger = ::Rails.logger
end
@logger = ::Logger.new(STDOUT) if @logger.nil?
end
return @logger
end
-
+
+ def reset!
+ @strict = false
+ end
end
def initialize # :nodoc:
@_namespace = [:default]
reset!
@@ -35,9 +40,10 @@
!@_store[@_namespace.last].send(method).nil? || super
end
# Removes ALL configuration parameters
def reset!
+ self.class.reset!
@_store = {:default => Configatron::Store.new}
end
# Allows for the temporary overriding of parameters in a block.
# Takes an optional Hash of parameters that will be applied before