Commit 56b3d3aa140f7ca72622ef3649ceb0fbfe211a31

Authored by binarylogic
1 parent 2f907e2b
Exists in master

Namespacing should only add the namespace values

Showing 1 changed file with 3 additions and 2 deletions   Show diff stats
lib/settingslogic.rb
... ... @@ -50,8 +50,9 @@ class Settingslogic < Hash
50 50 when Hash
51 51 self.update hash_or_file
52 52 else
53   - self.update YAML.load(ERB.new(File.read(hash_or_file)).result).to_hash
54   - self.update self[self.class.namespace] if self.class.namespace
  53 + hash = YAML.load(ERB.new(File.read(hash_or_file)).result).to_hash
  54 + hash = hash[self.class.namespace] if self.class.namespace
  55 + self.update hash
55 56 end
56 57  
57 58 define_settings!
... ...