def enter!
      @state_machine.current_state = self

      @entry_actions.each do |entry_action|
        entry_action.call(@state_machine)
      end
      @transition_map.each do |type, events_to_transition_arrays|
        events_to_transition_arrays.each do |event, transitions|
          transitions.each(&:arm)
        end
      end
    end
def enter!
      @state_machine.current_state = self

      @entry_actions.each do |entry_action|
        entry_action.call(@state_machine)
      end
      @transition_map.each do |type, events_to_transition_arrays|
        events_to_transition_arrays.each do |event, transitions|
          transitions.each(&:arm)
        end
      end
    end
Sets the state machine's current_state to self, calls all entry
 actions and activates triggering mechanisms of all outgoing
 transitions.