Module: AngryHash::ExtensionAware

Included in:
AngryHash
Defined in:
lib/angry_hash/extension_aware.rb

Overview

Adds extension awareness to core AngryHash copying methods

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
# File 'lib/angry_hash/extension_aware.rb', line 4

def self.included(base)
  base.extend ClassMethods
end

Instance Method Details

#reverse_deep_merge(other_hash) ⇒ Object



48
49
50
51
52
# File 'lib/angry_hash/extension_aware.rb', line 48

def reverse_deep_merge(other_hash)
  super.tap {|merged|
    self.class.copy_extension(self,merged)
  }
end