Class StateMachine::LoopbackMatcher
In: lib/state_machine/matcher.rb
Parent: Matcher

Matches a loopback of two values within a context. Since there is no configuration for this type of matcher, it must be used as a singleton.

Methods

Included Modules

Singleton

Public Instance methods

A human-readable description of this matcher. Always "same".

Checks whether the given value matches what the value originally was. This value should be defined in the context.

Examples

  matcher = StateMachine::LoopbackMatcher.instance
  matcher.matches?(:parked, :from => :parked)   # => true
  matcher.matches?(:parked, :from => :idling)   # => false

[Validate]