class Object
  def imbue(options)
    options.each do |key, value|
      prototype = respond_to?(:singleton_class) ? singleton_class : metaclass # fallback for ye olde Rails
      prototype.send(:define_method, key) { value }
    end
    self
  end
end