lib/confstruct/configuration.rb in confstruct-0.2.4 vs lib/confstruct/configuration.rb in confstruct-0.2.5

- old
+ new

@@ -4,20 +4,20 @@ class Configuration < HashWithStructAccess def initialize hash=@@hash_class.new, &block super({}) - @default_values = hash.is_a?(HashWithStructAccess) ? hash : HashWithStructAccess.from_hash(hash) + @default_values = HashWithStructAccess.from_hash(hash) eval_or_yield @default_values, &block reset_defaults! end def after_config! obj end def configure *args, &block if args[0].respond_to?(:each_pair) - self.deep_merge!(args[0]) + self.deep_merge!(HashWithStructAccess.from_hash(args[0])) end eval_or_yield self, &block after_config! self self end \ No newline at end of file