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

rotate!

        # Array.rotate!

(from ruby core)
---
    array.rotate! -> self
    array.rotate!(count) -> self

---

Rotates `self` in place by moving elements from one end to the other;
returns `self`.

When no argument given, rotates the first element to the last position:
    a = [:foo, 'bar', 2, 'bar']
    a.rotate! # => ["bar", 2, "bar", :foo]

When given a non-negative Integer `count`, rotates `count` elements from
the beginning to the end:
    a = [:foo, 'bar', 2]
    a.rotate!(2)
    a # => [2, :foo, "bar"]

If `count` is large, uses `count % array.size` as the count:
    a = [:foo, 'bar', 2]
    a.rotate!(20)
    a # => [2, :foo, "bar"]

If `count` is zero, returns `self` unmodified:
    a = [:foo, 'bar', 2]
    a.rotate!(0)
    a # => [:foo, "bar", 2]

When given a negative Integer `count`, rotates in the opposite
direction, from end to beginning:
    a = [:foo, 'bar', 2]
    a.rotate!(-2)
    a # => ["bar", 2, :foo]

If `count` is small (far from zero), uses `count % array.size` as the
count:
    a = [:foo, 'bar', 2]
    a.rotate!(-5)
    a # => ["bar", 2, :foo]



      

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.