vendor/bundle/ruby/1.8/gems/statemachine-2.0.1/lib/statemachine/statemachine.rb
# Resets the statemachine back to its starting state.
Resets the statemachine back to its starting state.
Resets the statemachine back to its starting state .
def reset
      @state = get_state(@root.startstate_id)
      while @state and not @state.concrete?
        @state = get_state(@state.startstate_id)
      end
      raise StatemachineException.new("The state machine doesn't know where to start. Try setting the startstate.") if @state == nil
      @state.enter
      @states.values.each { |state| state.reset }
    end
def reset @state = get_state ( @root . startstate_id ) while @state and not @state . concrete? @state = get_state ( @state . startstate_id ) end raise StatemachineException . new ( "The state machine doesn't know where to start. Try setting the startstate." ) if @state == nil @state . enter @states . values . each { | state | state . reset } end
Resets the statemachine back to its starting state.
Resets the statemachine back to its starting state .