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

to_a

        # Struct.to_a

(from ruby core)
---
    to_a     -> array

---

Returns the values in `self` as an array:

    Customer = Struct.new(:name, :address, :zip)
    joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
    joe.to_a # => ["Joe Smith", "123 Maple, Anytown NC", 12345]

Struct#values and Struct#deconstruct are aliases for Struct#to_a.

Related: #members.



      

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.