Module: DuckPuncher::AncestralHash

Included in:
DuckPuncher
Defined in:
lib/duck_puncher/ancestral_hash.rb

Overview

Note:

When updating this file please update comment regarding this module in duck_puncher.rb

Instance Method Summary collapse

Instance Method Details

#ancestral_hashObject



4
5
6
# File 'lib/duck_puncher/ancestral_hash.rb', line 4

def ancestral_hash
  ::Hash.new { |me, klass| me[me.keys.detect { |key| key > klass }] if klass }
end