This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

new

        # Class.new

(from ruby core)
---
    Class.new(super_class=Object)               -> a_class
    Class.new(super_class=Object) { |mod| ... } -> a_class

---

Creates a new anonymous (unnamed) class with the given superclass (or
Object if no parameter is given). You can give a class a name by
assigning the class object to a constant.

If a block is given, it is passed the class object, and the block is
evaluated in the context of this class like #class_eval.

    fred = Class.new do
      def meth1
        "hello"
      end
      def meth2
        "bye"
      end
    end

    a = fred.new     #=> #<#<Class:0x100381890>:0x100376b98>
    a.meth1          #=> "hello"
    a.meth2          #=> "bye"

Assign the class to a constant (name starting uppercase) if you want to
treat it like a regular class.


(from ruby core)
---
    class.new(args, ...)    ->  obj

---

Calls #allocate to create a new object of *class*'s class, then invokes
that object's #initialize method, passing it *args*.  This is the method
that ends up getting called whenever an object is constructed using
`.new`.



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.