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

[]

        # StringScanner.[]

(from ruby core)
---
    [](n)

---

Returns the n-th subgroup in the most recent match.

    s = StringScanner.new("Fri Dec 12 1975 14:39")
    s.scan(/(\w+) (\w+) (\d+) /)       # -> "Fri Dec 12 "
    s[0]                               # -> "Fri Dec 12 "
    s[1]                               # -> "Fri"
    s[2]                               # -> "Dec"
    s[3]                               # -> "12"
    s.post_match                       # -> "1975 14:39"
    s.pre_match                        # -> ""

    s.reset
    s.scan(/(?<wday>\w+) (?<month>\w+) (?<day>\d+) /)       # -> "Fri Dec 12 "
    s[0]                               # -> "Fri Dec 12 "
    s[1]                               # -> "Fri"
    s[2]                               # -> "Dec"
    s[3]                               # -> "12"
    s[:wday]                           # -> "Fri"
    s[:month]                          # -> "Dec"
    s[:day]                            # -> "12"
    s.post_match                       # -> "1975 14:39"
    s.pre_match                        # -> ""



      

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.