This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Array.uniq (from ruby core) --- array.uniq -> new_array array.uniq {|element| ... } -> new_array --- Returns a new Array containing those elements from `self` that are not duplicates, the first occurrence always being retained. With no block given, identifies and omits duplicates using method `eql?` to compare. a = [0, 0, 1, 1, 2, 2] a.uniq # => [0, 1, 2] With a block given, calls the block for each element; identifies (using method `eql?`) and omits duplicate values, that is, those elements for which the block returns the same value: a = ['a', 'aa', 'aaa', 'b', 'bb', 'bbb'] a.uniq {|element| element.size } # => ["a", "aa", "aaa"]
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.