lib/alfa/config.rb in alfa-0.0.5.pre vs lib/alfa/config.rb in alfa-0.0.6.pre
- old
+ new
@@ -2,20 +2,21 @@
class Config < ::Hash
def initialize
self[:db] = {}
self[:log] = {}
+ self[:session] = {key: 'session', secret: nil}
end
def []=(key, value)
- if [:db, :log].include? key
+ if [:db, :log, :session].include? key
raise "key :#{key} should include Enumerable" unless value.class.included_modules.include? Enumerable
end
super
end
def store(key, value)
- if [:db, :log].include? key
+ if [:db, :log, :session].include? key
raise "key :#{key} should include Enumerable" unless value.class.included_modules.include? Enumerable
end
super
end