Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/autumn/misc.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.parroting(hsh = {}) ⇒ Object

Returns a hash that gives back the key if it has no value for that key.



43
44
45
46
# File 'lib/autumn/misc.rb', line 43

def self.parroting(hsh={})
  hsh ||= Hash.new
  Hash.new { |h, k| k }.update(hsh)
end