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

collect

        # Array.collect

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

---

Calls the block, if given, with each element of `self`; returns a new
Array whose elements are the return values from the block:
    a = [:foo, 'bar', 2]
    a1 = a.map {|element| element.class }
    a1 # => [Symbol, String, Integer]

Returns a new Enumerator if no block given:
    a = [:foo, 'bar', 2]
    a1 = a.map
    a1 # => #<Enumerator: [:foo, "bar", 2]:map>

Array#collect is an alias for Array#map.



      

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.