class Array

Public Instance Methods

after(value) click to toggle source

returns the value after the given value. wraps around. defaults to first element in array.

# File lib/active_scaffold/extensions/array.rb, line 3
def after(value)
  return nil unless include? value
  self[(index(value).to_i + 1) % length]
end