Module: Que::Utils::Freeze
- Included in:
- Que
- Defined in:
- lib/que/utils/freeze.rb
Instance Method Summary collapse
Instance Method Details
#recursively_freeze(thing) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/que/utils/freeze.rb', line 8 def recursively_freeze(thing) case thing when Array thing.each { |e| recursively_freeze(e) } when Hash thing.each { |k, v| recursively_freeze(k); recursively_freeze(v) } end thing.freeze end |