lib/docman/config.rb in docman-0.0.13 vs lib/docman/config.rb in docman-0.0.14

- old
+ new

@@ -3,29 +3,32 @@ require 'digest/md5' module Docman class Config < Hash + attr_reader :unmutable_config + def initialize(file) super @config = YAML::load_file(file) assign_to_self end def assign_to_self @config.each_pair do |k, v| self[k] = v end + @unmutable_config = Marshal::load(Marshal.dump(@config)) end def merge_config_from_file(file) config = YAML::load_file(file) @config.deep_merge(config) assign_to_self end def config_hash - Digest::MD5.hexdigest(Marshal::dump(self)) + Digest::MD5.hexdigest(Marshal::dump(@unmutable_config)) end end end