class Hamster::Vector

def rotate(count = 1)

Returns:
  • (Vector) -

Parameters:
  • count (Integer) -- The number of positions to shift items by
def rotate(count = 1)
  return self if (count % @size) == 0
  self.class.new(((array = to_a).frozen? ? array.rotate(count) : array.rotate!(count)).freeze)
end