Flowdock
method

default_proc=

Importance_1
v1_9_3_392 - Show latest stable - 0 notes - Class: Hash
default_proc=(p1) public

Sets the default proc to be executed on each key lookup.

h.default_proc = proc do |hash, key|
  hash[key] = key + key
end
h[2]       #=> 4
h["cat"]   #=> "catcat"
Show source
Register or log in to add new notes.