This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

values_at

        # Struct.values_at

(from ruby core)
---
    values_at(*integers) -> array
    values_at(integer_range) -> array

---

Returns an array of values from `self`.

With integer arguments `integers` given, returns an array containing
each value given by one of `integers`:

    Customer = Struct.new(:name, :address, :zip)
    joe = Customer.new("Joe Smith", "123 Maple, Anytown NC", 12345)
    joe.values_at(0, 2)    # => ["Joe Smith", 12345]
    joe.values_at(2, 0)    # => [12345, "Joe Smith"]
    joe.values_at(2, 1, 0) # => [12345, "123 Maple, Anytown NC", "Joe Smith"]
    joe.values_at(0, -3)   # => ["Joe Smith", "Joe Smith"]

Raises IndexError if any of `integers` is out of range; see [Array
Indexes](Array.html#class-Array-label-Array+Indexes).

With integer range argument `integer_range` given, returns an array
containing each value given by the elements of the range; fills with
`nil` values for range elements larger than the structure:

    joe.values_at(0..2)
    # => ["Joe Smith", "123 Maple, Anytown NC", 12345]
    joe.values_at(-3..-1)
    # => ["Joe Smith", "123 Maple, Anytown NC", 12345]
    joe.values_at(1..4) # => ["123 Maple, Anytown NC", 12345, nil, nil]

Raises RangeError if any element of the range is negative and out of
range; see [Array Indexes](Array.html#class-Array-label-Array+Indexes).



      

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.