lib/confuse/config_mixin.rb in confuse-0.1.2 vs lib/confuse/config_mixin.rb in confuse-0.1.3
- old
+ new
@@ -32,13 +32,17 @@
ns = namespaces[namespace]
return ns unless rest_of_key
ns[rest_of_key, self]
end
+ def []=(key, value)
+ mixin_config!({key => value})
+ end
+
def to_hash
namespaces.reduce({}) do |memo, (name, namespace)|
namespace.keys.each do |key|
- memo["#{name}_#{key}"] = namespace[key, self]
+ memo[:"#{name}_#{key}"] = namespace[key, self]
end
memo
end
end