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

divide

        # Set.divide

(from ruby core)
---
    divide(&func)

---

Divides the set into a set of subsets according to the commonality
defined by the given block.
If the arity of the block is 2, elements o1 and o2 are in common
if block.call(o1, o2) is true. Otherwise, elements o1 and o2 are
in common if block.call(o1) == block.call(o2).
    require 'set'
    numbers = Set[1, 3, 4, 6, 9, 10, 11]
    set = numbers.divide { |i,j| (i - j).abs == 1 }
    set        #=> #<Set: {#<Set: {1}>,
               #           #<Set: {11, 9, 10}>,
               #           #<Set: {3, 4}>,
               #           #<Set: {6}>}>

Returns an enumerator if no block is given.



      

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.