This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Array.values_at (from ruby core) --- array.values_at(*indexes) -> new_array --- Returns a new Array whose elements are the elements of `self` at the given Integer or Range `indexes`. For each positive `index`, returns the element at offset `index`: a = [:foo, 'bar', 2] a.values_at(0, 2) # => [:foo, 2] a.values_at(0..1) # => [:foo, "bar"] The given `indexes` may be in any order, and may repeat: a = [:foo, 'bar', 2] a.values_at(2, 0, 1, 0, 2) # => [2, :foo, "bar", :foo, 2] a.values_at(1, 0..2) # => ["bar", :foo, "bar", 2] Assigns `nil` for an `index` that is too large: a = [:foo, 'bar', 2] a.values_at(0, 3, 1, 3) # => [:foo, nil, "bar", nil] Returns a new empty Array if no arguments given. For each negative `index`, counts backward from the end of the array: a = [:foo, 'bar', 2] a.values_at(-1, -3) # => [2, :foo] Assigns `nil` for an `index` that is too small: a = [:foo, 'bar', 2] a.values_at(0, -5, 1, -6, 2) # => [:foo, nil, "bar", nil, 2] The given `indexes` may have a mixture of signs: a = [:foo, 'bar', 2] a.values_at(0, -2, 1, -1) # => [:foo, "bar", "bar", 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.