This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Array.keep_if (from ruby core) --- array.keep_if {|element| ... } -> self array.keep_if -> new_enumeration --- Retains those elements for which the block returns a truthy value; deletes all other elements; returns `self`: a = [:foo, 'bar', 2, :bam] a.keep_if {|element| element.to_s.start_with?('b') } # => ["bar", :bam] Returns a new Enumerator if no block given: a = [:foo, 'bar', 2, :bam] a.keep_if # => #<Enumerator: [:foo, "bar", 2, :bam]:keep_if>
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.