@behaviour = Hash.new { |hash, key| hash[key] = Hash.new }
What the fuck does this mean?
>>60858848
It creates a class attribute variable that contains a hash with default values, see https://ruby-doc.org/core-1.9.3/Hash.html
>>60858960
Why would you use this over a simple Hash.new?
>>60859037
No idea, but I sure hope I don't find this in a real codebase.
>>60859124
Thanks!