This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Array.filter (from ruby core) --- filter() --- Calls the block, if given, with each element of `self`; returns a new Array containing those elements of `self` for which the block returns a truthy value: a = [:foo, 'bar', 2, :bam] a1 = a.select {|element| element.to_s.start_with?('b') } a1 # => ["bar", :bam] Returns a new Enumerator if no block given: a = [:foo, 'bar', 2, :bam] a.select # => #<Enumerator: [:foo, "bar", 2, :bam]:select> Array#filter is an alias for Array#select. (This method is an alias for Array#select.) Calls the block, if given, with each element of `self`; returns a new Array containing those elements of `self` for which the block returns a truthy value: a = [:foo, 'bar', 2, :bam] a1 = a.select {|element| element.to_s.start_with?('b') } a1 # => ["bar", :bam] Returns a new Enumerator if no block given: a = [:foo, 'bar', 2, :bam] a.select # => #<Enumerator: [:foo, "bar", 2, :bam]:select> Array#filter is an alias for Array#select.
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.