Help for this page

Select Code to Download


  1. or download this
    Proto = Class.new(Class)    # Beware: magic.
    def Proto.clone
      Class.new(self)
    end
    
  2. or download this
    class PrototypeClass
      attr_reader :prototype
    ...
    end
    
    Prototype = PrototypeClass.new(nil)
    
  3. or download this
    @foo = Prototype.new %q{
      attr_accessor :name
    ...
    puts "Included module"
    
    test_greet()