Sha256: aaa0595b94ca3494720391b4aa81d098a2efdb34e8b2fb1f94ad5a8c7e0601b5

Contents?: true

Size: 338 Bytes

Versions: 7

Compression:

Stored size: 338 Bytes

Contents

== Array#rotate

  require 'facets/array/rotate'

clockwise

  a = [1,2,3]
  r = a.rotate
  r.assert == [2,3,1]

counter-clockwise

  a = [1,2,3]
  r = a.rotate(-1)
  r.assert == [3,1,2]

== Array#rotate!

clockwise

  a = [1,2,3]
  a.rotate!
  a.assert == [2,3,1]

counter-clockwise

  a = [1,2,3]
  a.rotate!(-1)
  a.assert == [3,1,2]

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
facets-3.0.0 demo/core/array/rotate.rdoc
facets-2.9.3 qed/core/array/rotate.rdoc
facets-2.9.2 qed/core/array/rotate.rdoc
facets-2.9.1 qed/core/array/rotate.rdoc
facets-2.9.0 qed/core/array/rotate.rdoc
facets-2.9.0.pre.2 qed/core/array/rotate.rdoc
facets-2.9.0.pre.1 qed/core/array/rotate.rdoc