# File lib/tins/rotate.rb, line 12 def rotate(n = 1) clone.rotate!(n) end
# File lib/tins/rotate.rb, line 3 def rotate!(n = 1) if n >= 0 n.times { push shift } else (-n).times { unshift pop } end self end
[Validate]
Generated with the Darkfish Rdoc Generator 2.