lib/confuse/config_mixin.rb in confuse-0.1.7 vs lib/confuse/config_mixin.rb in confuse-0.1.8

- old
+ new

@@ -41,23 +41,14 @@ end def to_hash namespaces.reduce({}) do |memo, (name, namespace)| namespace.keys.each do |key| - memo[:"#{name}_#{key}"] = namespace[key, self] - end - memo - end - end - - def self.params_hash - namespaces.reduce({}) do |memo, (name, namespace)| - namespace.keys.each do |key| - item = namespace.get_item(key) - memo[:"#{name}_#{key}"] = { - :type => item.type, - :doc => item.description, - :default => item.default_value } + if name != :default + memo[:"#{name}_#{key}"] = namespace[key, self] + else + memo[:"#{key}"] = namespace[key, self] + end end memo end end