module Taskinator::Workflow

Public Instance Methods

current_state() click to toggle source
# File lib/taskinator/workflow.rb, line 4
def current_state
  @current_state ||= load_workflow_state
end
current_state=(new_state) click to toggle source
# File lib/taskinator/workflow.rb, line 8
def current_state=(new_state)
  return if new_state == @current_state
  @current_state = persist_workflow_state(new_state)
end
transition(new_state) { || ... } click to toggle source
# File lib/taskinator/workflow.rb, line 13
def transition(new_state)
  self.current_state = new_state
  yield if block_given?
  current_state
end