Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/autumn/misc.rb
Overview
:nodoc:
Class Method Summary collapse
-
.parroting(hsh = {}) ⇒ Object
Returns a hash that gives back the key if it has no value for that key.
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 |