# autovivify.rb

require 'facets/more/openobject.rb'

# AutoVivify module houses the +method_missing+ defintion.

module AutoVivify
  def method_missing( name, *args, &block )
    oo = OpenObject.new
    (class << self; self; end).send( :define_method, name ) { oo }
  end
end

class Object
  include AutoVivify
end
