Method: Hash#put!
- Defined in:
- lib/casual_support/hash/putbang.rb
#put!(key, value) ⇒ Hash
Associates key
with value
. Similar to Hash#[]=, but returns the Hash instead of the value. Faster than Hash#merge! for single updates in a loop.
15 16 17 18 |
# File 'lib/casual_support/hash/putbang.rb', line 15 def put!(key, value) self[key] = value self end |