Class: ActiveScaffold::Ring
Instance Method Summary collapse
-
#after(value) ⇒ Object
Returns the value after the given value.
Instance Method Details
#after(value) ⇒ Object
Returns the value after the given value. Wraps around.
3 4 5 |
# File 'lib/active_scaffold/ring.rb', line 3 def after(value) include?(value) ? self[(index(value).to_i + 1) % length] : nil end |