Skip to content

Instantly share code, notes, and snippets.

@pokonski
pokonski / hashquiz.rb
Created April 16, 2012 18:46 — forked from potatosalad/hashquiz.rb
Ruby quiz for convert hash "dot paths" into actual hash hierarchy.
#require 'rubygems'
require 'pp'
#require 'ap' # Awesome Print
class Object
# expects [ [ symbol, *args ], ... ]
def recursive_send(*args)
args.inject(self) { |obj, m| obj.send(m.shift, *m) }
end
end