This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Array.to_a (from ruby core) --- to_a -> self or new_array --- When `self` is an instance of Array, returns `self`: a = [:foo, 'bar', 2] a.to_a # => [:foo, "bar", 2] Otherwise, returns a new Array containing the elements of `self`: class MyArray < Array; end a = MyArray.new(['foo', 'bar', 'two']) a.instance_of?(Array) # => false a.kind_of?(Array) # => true a1 = a.to_a a1 # => ["foo", "bar", "two"] a1.class # => Array # Not MyArray
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.