class Statefully::State::Finished

{Finished} state is a state which is successful, but should not be processed any further. This could be useful for things like early returns.

Public Instance Methods

diff() click to toggle source

Return a {Diff} between current and previous {State}

This method reeks of :reek:UtilityFunction - just implementing an API.

@return [Diff::Finished] @api public @example

Statefully::State.create(key: 'val').finish.diff
=> #<Statefully::Diff::Finished>
# File lib/statefully/state.rb, line 485
def diff
  Diff::Finished.instance
end
finished?() click to toggle source

Check if the current {State} is finished

@return [Boolean] @api public @example

state = Statefully::State.create
state.finished?
=> false

state.finish.finished?
=> true
# File lib/statefully/state.rb, line 500
def finished?
  true
end