theforeman/smart-proxy

View on GitHub
lib/proxy/dhcp/monkey_patch_subnet.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Array
  # Ruby1.8 doesn't have a rotate function, so we add our own...
  def rotate n = 1
    return self if empty?
    n %= length
    self[n..-1]+self[0...n]
  end
end