This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Enumerator.with_object (from ruby core) --- with_object(p1) --- Iterates the given block for each element with an arbitrary object, `obj`, and returns `obj` If no block is given, returns a new Enumerator. ### Example to_three = Enumerator.new do |y| 3.times do |x| y << x end end to_three_with_string = to_three.with_object("foo") to_three_with_string.each do |x,string| puts "#{string}: #{x}" end # => foo: 0 # => foo: 1 # => foo: 2 (This method is an alias for Enumerator#each_with_object.) Iterates the given block for each element with an arbitrary object, `obj`, and returns `obj` If no block is given, returns a new Enumerator. ### Example to_three = Enumerator.new do |y| 3.times do |x| y << x end end to_three_with_string = to_three.with_object("foo") to_three_with_string.each do |x,string| puts "#{string}: #{x}" end # => foo: 0 # => foo: 1 # => foo: 2
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.