lib/authlogic/config.rb in authlogic-3.4.6 vs lib/authlogic/config.rb in authlogic-3.5.0
- old
+ new
@@ -1,15 +1,16 @@
-#encoding: utf-8
+# encoding: utf-8
module Authlogic
module Config
def self.extended(klass)
klass.class_eval do
class_attribute :acts_as_authentic_config
self.acts_as_authentic_config ||= {}
end
end
private
+
# This is a one-liner method to write a config setting, read the config
# setting, and also set a default value for the setting.
def rw_config(key, value, default_value = nil)
if value.nil?
acts_as_authentic_config.include?(key) ? acts_as_authentic_config[key] : default_value