Class: FiniteMachine::UndefinedTransition Private

Inherits:
Object
  • Object
show all
Defined in:
lib/finite_machine/undefined_transition.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Stand in for lack of matching transition.

Used internally by EventsMap

API:

  • private

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ UndefinedTransition

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Initialize an undefined transition

API:

  • private



13
14
15
16
# File 'lib/finite_machine/undefined_transition.rb', line 13

def initialize(name)
  @name = name
  freeze
end

Instance Method Details

#==(other) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



22
23
24
# File 'lib/finite_machine/undefined_transition.rb', line 22

def ==(other)
  other.is_a?(UndefinedTransition) && name == other.name
end

#to_state(from) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

API:

  • private



18
19
20
# File 'lib/finite_machine/undefined_transition.rb', line 18

def to_state(from)
  from
end