class Array

Public Instance Methods

roll(n=1) click to toggle source
# File lib/astromapper/extensions/array.rb, line 2
def roll(n=1)
  n.times.map{ self.rotate!; self.first }.inject{|s,x| s + x}
end