instance method
advance!
Ruby on Rails 8.1.2
Since v8.1.2Signature
advance!(from: nil)
Advance the cursor from the current or supplied value
The cursor will be advanced by calling the succ method on the cursor. An UnadvanceableCursorError error will be raised if the cursor does not implement succ.
Parameters
-
fromkey = nil
Source
# File activejob/lib/active_job/continuation/step.rb, line 49
def advance!(from: nil)
from = cursor if from.nil?
begin
to = from.succ
rescue NoMethodError
raise UnadvanceableCursorError, "Cursor class '#{from.class}' does not implement 'succ'"
end
set! to
end
Defined in activejob/lib/active_job/continuation/step.rb line 49
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveJob::Continuation::Step