Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/insensitive_hash.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#insensitive(options = {}) ⇒ InsensitiveHash
11 12 13 14 15 16 17 18 19 |
# File 'lib/insensitive_hash.rb', line 11 def insensitive = {} InsensitiveHash.new.tap do |ih| ih.safe = [:safe] if .key?(:safe) ih.default = default ih.default_proc = default_proc if default_proc ih.merge_recursive!(self) end end |