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

take_while

        # Array.take_while

(from ruby core)
---
    array.take_while {|element| ... } -> new_array
    array.take_while -> new_enumerator

---

Returns a new Array containing zero or more leading elements of `self`;
does not modify `self`.

With a block given, calls the block with each successive element of
`self`; stops if the block returns `false` or `nil`; returns a new Array
containing those elements for which the block returned a truthy value:
    a = [0, 1, 2, 3, 4, 5]
    a.take_while {|element| element < 3 } # => [0, 1, 2]
    a.take_while {|element| true } # => [0, 1, 2, 3, 4, 5]
    a # => [0, 1, 2, 3, 4, 5]

With no block given, returns a new Enumerator:
    [0, 1].take_while # => #<Enumerator: [0, 1]:take_while>



      

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.