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

assoc

        # Array.assoc

(from ruby core)
---
    array.assoc(obj) -> found_array or nil

---

Returns the first element in `self` that is an Array whose first element
`==` `obj`:
    a = [{foo: 0}, [2, 4], [4, 5, 6], [4, 5]]
    a.assoc(4) # => [4, 5, 6]

Returns `nil` if no such element is found.

Related: #rassoc.



      

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.